← Catalog

@brightmeows/pi-inline-context

会话环境摘要注入:日期、系统、Git 状态与工具清单

Package

Install

Install with PiG

pig install npm:@brightmeows/pi-inline-context

Install with Pi

pi install npm:@brightmeows/pi-inline-context
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.

@brightmeows/pi-inline-context

在会话开始与每轮请求前注入环境摘要,让模型带着当下环境干活。

注入内容

  • 日期:每轮现算,跨天自动更新
  • 系统环境:会话内一次,含 OS、WSL、SSH、提权、代理 TUN 信号,只陈述事实不带操作指南
  • Git 快照:remote(URL 剥 userinfo 凭据后才注入)、dirty 数、ahead-behind、stash、进行中操作、最近提交;resume 自动重算,行尾标注快照过期语义
  • 工具与 gh:检测 fd、rg 等已装 CLI 与 gh 登录账号,未安装自动省略

完整信息走结构化提示段 sections.inline_context,另投一条单行摘要 message 供 TUI 可见。全部检测异步预计算,不阻塞首条消息。

安装

pi install npm:@brightmeows/pi-inline-context

适配版本

实测 pi 1.5.2。

License

MIT