@chen_hu_hu/pi-qq 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/README-zh.md +13 -10
- package/README.md +13 -10
- package/doc/bugfix-v4.md +698 -0
- package/doc/enhance-status.md +427 -0
- package/index.ts +40 -31
- package/package.json +1 -1
- package/src/attachments/attachment-download.ts +13 -8
- package/src/attachments/attachment-failure.ts +4 -2
- package/src/attachments/file-attachments.ts +11 -4
- package/src/infra/file-logger.ts +6 -2
- package/src/infra/i18n.ts +525 -0
- package/src/infra/power-status.ts +116 -0
- package/src/infra/settings.ts +28 -8
- package/src/qq/inbound-attachments.ts +2 -1
- package/src/qq/inbound-command.ts +40 -14
- package/src/qq/qq-bot.ts +4 -7
- package/src/qq/qq-diagnostics.ts +28 -21
- package/src/qq/qq-message-handler.ts +26 -3
- package/src/qq/qr-login.ts +9 -8
- package/src/qq/reply-sender.ts +27 -3
- package/src/qq/status-report.ts +112 -0
- package/src/quota/reply-quota-report.ts +36 -8
- package/src/relay/bubble-writer.ts +35 -3
- package/src/relay/run-stream-relay.ts +44 -7
- package/src/relay/stream-block-format.ts +6 -2
- package/src/relay/stream-session.ts +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.4] - 2026-11-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `/status` now shows agent state, connection state, model/context, QQ user, battery (when available), and icons.
|
|
15
|
+
- `language` setting for `zh-cn` / `en-us`; user-facing text and logs are localized.
|
|
16
|
+
- Stable `msgKey` in structured logs for language-independent filtering.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Default language is `zh-cn`.
|
|
21
|
+
|
|
22
|
+
## [1.3.3] - 2026-11-04
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- QQ `/last` command: push the last completed assistant message as a new stream bubble, or restart the current output while a run is active.
|
|
27
|
+
|
|
10
28
|
## [1.3.2] - 2026-11-04
|
|
11
29
|
|
|
12
30
|
### Added
|
|
@@ -55,7 +73,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
55
73
|
- Added thinking labels, per-tool icons, model-error recovery, and idle-safe session handling.
|
|
56
74
|
- Reorganized modules by bounded context and updated settings and delivery documentation.
|
|
57
75
|
|
|
58
|
-
[Unreleased]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.
|
|
76
|
+
[Unreleased]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.4...HEAD
|
|
77
|
+
[1.3.4]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.3...v1.3.4
|
|
78
|
+
[1.3.3]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.2...v1.3.3
|
|
59
79
|
[1.3.2]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.1...v1.3.2
|
|
60
80
|
[1.3.1]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.0...v1.3.1
|
|
61
81
|
[1.3.0]: https://github.com/CQ-Developer/pi-qq/compare/v1.2.3...v1.3.0
|
package/README-zh.md
CHANGED
|
@@ -28,7 +28,7 @@ pi --extension /path/to/pi-qq
|
|
|
28
28
|
2. 执行 `/qq-login`。
|
|
29
29
|
3. 用手机 QQ 扫描二维码。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
登录凭据不会写入配置文件。重启 pi 后需要重新扫码。`/qq-logout` 会立即清除凭据。
|
|
32
32
|
|
|
33
33
|
## 使用
|
|
34
34
|
|
|
@@ -89,18 +89,19 @@ Summarize this file.
|
|
|
89
89
|
| ------------ | -------------------------------------- |
|
|
90
90
|
| `/qq-login` | 扫码登录并绑定扫码的 QQ 用户 |
|
|
91
91
|
| `/qq-status` | 显示登录、连接、模型、上下文和绑定用户 |
|
|
92
|
-
| `/qq-logout` |
|
|
92
|
+
| `/qq-logout` | 退出登录并清除凭据 |
|
|
93
93
|
| `/qq-new` | 重置当前会话(由 QQ 侧 `/new` 调用) |
|
|
94
94
|
|
|
95
95
|
QQ 侧命令:
|
|
96
96
|
|
|
97
|
-
| 命令 | 说明
|
|
98
|
-
| ---------- |
|
|
99
|
-
| `/new` | 开始新的 pi 会话
|
|
100
|
-
| `/stop` | 中止当前运行
|
|
101
|
-
| `/compact` | 压缩当前上下文
|
|
102
|
-
| `/status` | 显示会话和上下文状态
|
|
103
|
-
| `/
|
|
97
|
+
| 命令 | 说明 |
|
|
98
|
+
| ---------- | -------------------------------------------- |
|
|
99
|
+
| `/new` | 开始新的 pi 会话 |
|
|
100
|
+
| `/stop` | 中止当前运行 |
|
|
101
|
+
| `/compact` | 压缩当前上下文 |
|
|
102
|
+
| `/status` | 显示会话和上下文状态 |
|
|
103
|
+
| `/last` | 以流式推送最近完成的回复,或重新推送当前输出 |
|
|
104
|
+
| `/help` | 显示命令帮助 |
|
|
104
105
|
|
|
105
106
|
### 诊断
|
|
106
107
|
|
|
@@ -119,15 +120,17 @@ QQ 侧命令:
|
|
|
119
120
|
```json
|
|
120
121
|
{
|
|
121
122
|
"thinkingRelay": true,
|
|
123
|
+
"language": "zh-cn",
|
|
122
124
|
"logLevel": "silent"
|
|
123
125
|
}
|
|
124
126
|
```
|
|
125
127
|
|
|
126
128
|
| 配置项 | 默认值 | 说明 |
|
|
127
129
|
| --------------- | ---------- | ------------------------------------------------------ |
|
|
128
|
-
| `thinkingRelay` | `true` |
|
|
130
|
+
| `thinkingRelay` | `true` | 以本地化的 `💭` 标题纯文本回传思考;`false` 时隐藏 |
|
|
129
131
|
| `deliverAs` | `"steer"` | 忙碌时新消息的排队方式:`steer` 或 `followUp` |
|
|
130
132
|
| `fileMaxSize` | `52428800` | QQ 附件下载上限(字节,50MB) |
|
|
133
|
+
| `language` | `"zh-cn"` | UI 和日志语言:`zh-cn` 或 `en-us` |
|
|
131
134
|
| `logLevel` | `"silent"` | 日志阈值:`silent`、`error`、`warn`、`info` 或 `debug` |
|
|
132
135
|
|
|
133
136
|
配置在 pi 会话启动时读取;修改文件后请重启 pi。未知配置项会被忽略,无效值会回退到默认值并给出提示。
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ pi --extension /path/to/pi-qq
|
|
|
28
28
|
2. Run `/qq-login`.
|
|
29
29
|
3. Scan the QR code with mobile QQ.
|
|
30
30
|
|
|
31
|
-
Credentials are
|
|
31
|
+
Credentials are not written to `pi-qq.json`. Restarting pi requires scanning again. `/qq-logout` clears the credentials immediately.
|
|
32
32
|
|
|
33
33
|
## Usage
|
|
34
34
|
|
|
@@ -89,18 +89,19 @@ Run these in the pi terminal:
|
|
|
89
89
|
| ------------ | ------------------------------------------------------ |
|
|
90
90
|
| `/qq-login` | Log in with a QR code and bind the scanning QQ user |
|
|
91
91
|
| `/qq-status` | Show login, connection, model, context, and bound user |
|
|
92
|
-
| `/qq-logout` | Log out and clear
|
|
92
|
+
| `/qq-logout` | Log out and clear credentials |
|
|
93
93
|
| `/qq-new` | Reset the current session (used by QQ `/new`) |
|
|
94
94
|
|
|
95
95
|
QQ-side commands:
|
|
96
96
|
|
|
97
|
-
| Command | Description
|
|
98
|
-
| ---------- |
|
|
99
|
-
| `/new` | Start a new pi session
|
|
100
|
-
| `/stop` | Abort the current run
|
|
101
|
-
| `/compact` | Compact the current context
|
|
102
|
-
| `/status` | Show session and context status
|
|
103
|
-
| `/
|
|
97
|
+
| Command | Description |
|
|
98
|
+
| ---------- | ------------------------------------------------------------------------ |
|
|
99
|
+
| `/new` | Start a new pi session |
|
|
100
|
+
| `/stop` | Abort the current run |
|
|
101
|
+
| `/compact` | Compact the current context |
|
|
102
|
+
| `/status` | Show session and context status |
|
|
103
|
+
| `/last` | Push the last completed reply as a stream, or restart the current output |
|
|
104
|
+
| `/help` | Show command help |
|
|
104
105
|
|
|
105
106
|
### Diagnostics
|
|
106
107
|
|
|
@@ -119,15 +120,17 @@ Create `~/.pi/agent/pi-qq.json` to override defaults. It stores settings only; c
|
|
|
119
120
|
```json
|
|
120
121
|
{
|
|
121
122
|
"thinkingRelay": true,
|
|
123
|
+
"language": "zh-cn",
|
|
122
124
|
"logLevel": "silent"
|
|
123
125
|
}
|
|
124
126
|
```
|
|
125
127
|
|
|
126
128
|
| Key | Default | Description |
|
|
127
129
|
| --------------- | ---------- | ------------------------------------------------------------ |
|
|
128
|
-
| `thinkingRelay` | `true` | Relay thinking as plain text with a
|
|
130
|
+
| `thinkingRelay` | `true` | Relay thinking as plain text with a localized `💭` header |
|
|
129
131
|
| `deliverAs` | `"steer"` | Queue new messages while busy: `steer` or `followUp` |
|
|
130
132
|
| `fileMaxSize` | `52428800` | QQ attachment download limit in bytes (50MB) |
|
|
133
|
+
| `language` | `"zh-cn"` | UI and log language: `zh-cn` or `en-us` |
|
|
131
134
|
| `logLevel` | `"silent"` | Log threshold: `silent`, `error`, `warn`, `info`, or `debug` |
|
|
132
135
|
|
|
133
136
|
Settings are read when a pi session starts; restart pi after editing the file. Unknown keys are ignored, and invalid values fall back to defaults with a warning.
|