@hienlh/ppm 0.9.55 → 0.9.57
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
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.57] - 2026-04-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **Telegram bot thinking display**: Consecutive thinking chunks are now merged into a single `💭` block instead of rendering as multiple broken lines.
|
|
7
|
+
|
|
8
|
+
## [0.9.56] - 2026-04-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Usage panel shows all accounts**: Expired temporary accounts are no longer hidden from Usage & Accounts panel. Users can delete them manually.
|
|
12
|
+
|
|
3
13
|
## [0.9.55] - 2026-04-07
|
|
4
14
|
|
|
5
15
|
### Added
|
package/package.json
CHANGED
|
@@ -282,8 +282,6 @@ export function getAllAccountUsages(): AccountUsageEntry[] {
|
|
|
282
282
|
const result: AccountUsageEntry[] = [];
|
|
283
283
|
for (const acc of accounts) {
|
|
284
284
|
const withTokens = accountService.getWithTokens(acc.id);
|
|
285
|
-
// Skip expired accounts without refresh token (temporary/disposable)
|
|
286
|
-
if (acc.expiresAt && acc.expiresAt < nowS && !withTokens?.refreshToken) continue;
|
|
287
285
|
const isOAuth = withTokens?.accessToken.startsWith("sk-ant-oat") ?? false;
|
|
288
286
|
const row = snapshotMap.get(acc.id);
|
|
289
287
|
result.push({
|
|
@@ -56,12 +56,19 @@ export interface StreamResult {
|
|
|
56
56
|
* - "md" = raw markdown from AI (needs conversion)
|
|
57
57
|
* - "html" = pre-formatted HTML (tool calls, thinking, errors — already escaped)
|
|
58
58
|
*/
|
|
59
|
-
type Segment =
|
|
59
|
+
type Segment =
|
|
60
|
+
| { type: "md"; text: string }
|
|
61
|
+
| { type: "html"; text: string }
|
|
62
|
+
| { type: "thinking"; text: string };
|
|
60
63
|
|
|
61
64
|
/** Render segments into Telegram HTML */
|
|
62
65
|
function renderSegments(segments: Segment[]): string {
|
|
63
66
|
return segments
|
|
64
|
-
.map((s) =>
|
|
67
|
+
.map((s) => {
|
|
68
|
+
if (s.type === "md") return markdownToTelegramHtml(s.text);
|
|
69
|
+
if (s.type === "thinking") return `\n<i>💭 ${escapeHtml(s.text)}</i>\n`;
|
|
70
|
+
return s.text;
|
|
71
|
+
})
|
|
65
72
|
.join("");
|
|
66
73
|
}
|
|
67
74
|
|
|
@@ -168,7 +175,12 @@ export async function streamToTelegram(
|
|
|
168
175
|
|
|
169
176
|
case "thinking": {
|
|
170
177
|
if (config.showThinking && event.content) {
|
|
171
|
-
|
|
178
|
+
const last = segments[segments.length - 1];
|
|
179
|
+
if (last?.type === "thinking") {
|
|
180
|
+
last.text += event.content;
|
|
181
|
+
} else {
|
|
182
|
+
segments.push({ type: "thinking", text: event.content });
|
|
183
|
+
}
|
|
172
184
|
await editCurrent();
|
|
173
185
|
}
|
|
174
186
|
break;
|