@foxden-app/foxclaw 0.5.36 → 0.5.38
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 +20 -0
- package/dist/controller/controller.js +21 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
|
|
4
4
|
|
|
5
|
+
## 0.5.38 - 2026-06-17
|
|
6
|
+
|
|
7
|
+
### 中文
|
|
8
|
+
- `/auth` RichMessage 候选表新增可点击的命令链接试验:auth 名称链接到 `/auth use N`,并新增 `Command` 列展示 `use` 与 enable/disable 命令链接。
|
|
9
|
+
- 为避免动作能力倒退,原 inline callback 按钮仍保留;这版用于观察 Telegram 客户端对 rich command links 的真实体验。
|
|
10
|
+
|
|
11
|
+
### English
|
|
12
|
+
- Added an experimental command-link layer to the `/auth` RichMessage candidate table: auth names link to `/auth use N`, and a new `Command` column exposes `use` plus enable/disable command links.
|
|
13
|
+
- The existing inline callback buttons remain in place to avoid losing reliable actions; this release is for observing the real Telegram client behavior of rich command links.
|
|
14
|
+
|
|
15
|
+
## 0.5.37 - 2026-06-17
|
|
16
|
+
|
|
17
|
+
### 中文
|
|
18
|
+
- 精简 `/auth` RichMessage 表格的 `Quota A` / `Quota B` 单元格:只显示剩余额度百分比,例如 `26%`,窗口含义交给列和后续套餐/状态信息理解。
|
|
19
|
+
- 保持原始文本 fallback 和按钮文本不变,避免影响旧命令、微信复制路径和 auth 切换回调。
|
|
20
|
+
|
|
21
|
+
### English
|
|
22
|
+
- Simplified the `/auth` RichMessage `Quota A` / `Quota B` cells to show only the remaining percentage, such as `26%`, leaving the window context to the columns and following plan/status fields.
|
|
23
|
+
- Kept the plain-text fallback and button labels unchanged so legacy commands, Weixin copy-paste flows, and auth switching callbacks remain stable.
|
|
24
|
+
|
|
5
25
|
## 0.5.36 - 2026-06-17
|
|
6
26
|
|
|
7
27
|
### 中文
|
|
@@ -8539,25 +8539,29 @@ function parseRichAuthCandidateRow(line) {
|
|
|
8539
8539
|
quotaB: quotas[1] ?? '-',
|
|
8540
8540
|
name,
|
|
8541
8541
|
current,
|
|
8542
|
+
enabled: statusParts.health === 'disabled' || statusParts.health === '已禁用'
|
|
8543
|
+
? false
|
|
8544
|
+
: statusParts.health === '-' ? null : true,
|
|
8542
8545
|
...statusParts,
|
|
8543
8546
|
};
|
|
8544
8547
|
}
|
|
8545
8548
|
function formatRichAuthCandidateTable(rows) {
|
|
8546
8549
|
return [
|
|
8547
8550
|
'<table bordered striped>',
|
|
8548
|
-
'<tr><th>#</th><th>Quota A</th><th>Quota B</th><th>Auth</th><th>Current</th><th>Plan</th><th>Health</th><th>Last refresh</th><th>Expiry</th><th>Risk</th></tr>',
|
|
8551
|
+
'<tr><th>#</th><th>Quota A</th><th>Quota B</th><th>Auth</th><th>Current</th><th>Plan</th><th>Health</th><th>Last refresh</th><th>Expiry</th><th>Risk</th><th>Command</th></tr>',
|
|
8549
8552
|
...rows.map(row => [
|
|
8550
8553
|
'<tr>',
|
|
8551
8554
|
`<td>${escapeTelegramHtml(row.index)}</td>`,
|
|
8552
8555
|
`<td>${escapeTelegramHtml(row.quotaA)}</td>`,
|
|
8553
8556
|
`<td>${escapeTelegramHtml(row.quotaB)}</td>`,
|
|
8554
|
-
`<td>${
|
|
8557
|
+
`<td>${formatRichAuthCommandLink(`/auth use ${row.index}`, row.name)}</td>`,
|
|
8555
8558
|
`<td>${row.current ? 'yes' : '-'}</td>`,
|
|
8556
8559
|
`<td>${escapeTelegramHtml(row.plan)}</td>`,
|
|
8557
8560
|
`<td>${escapeTelegramHtml(row.health)}</td>`,
|
|
8558
8561
|
`<td>${escapeTelegramHtml(row.refresh)}</td>`,
|
|
8559
8562
|
`<td>${escapeTelegramHtml(row.expiry)}</td>`,
|
|
8560
8563
|
`<td>${escapeTelegramHtml(row.risk)}</td>`,
|
|
8564
|
+
`<td>${formatRichAuthCommandCell(row)}</td>`,
|
|
8561
8565
|
'</tr>',
|
|
8562
8566
|
].join('')),
|
|
8563
8567
|
'</table>',
|
|
@@ -8609,7 +8613,21 @@ function formatRichAuthQuotaCell(value) {
|
|
|
8609
8613
|
if (!windowLabel || percent === undefined) {
|
|
8610
8614
|
return trimmed;
|
|
8611
8615
|
}
|
|
8612
|
-
return `${
|
|
8616
|
+
return `${percent}%`;
|
|
8617
|
+
}
|
|
8618
|
+
function formatRichAuthCommandCell(row) {
|
|
8619
|
+
const commands = [formatRichAuthCommandLink(`/auth use ${row.index}`, 'use')];
|
|
8620
|
+
if (row.enabled === true) {
|
|
8621
|
+
commands.push(formatRichAuthCommandLink(`/auth disable ${row.index}`, 'disable'));
|
|
8622
|
+
}
|
|
8623
|
+
else if (row.enabled === false) {
|
|
8624
|
+
commands.push(formatRichAuthCommandLink(`/auth enable ${row.index}`, 'enable'));
|
|
8625
|
+
}
|
|
8626
|
+
return commands.join(' ');
|
|
8627
|
+
}
|
|
8628
|
+
function formatRichAuthCommandLink(command, label) {
|
|
8629
|
+
const url = `tg://msg?text=${encodeURIComponent(command)}`;
|
|
8630
|
+
return `<a href="${escapeTelegramHtml(url)}">${escapeTelegramHtml(label)}</a>`;
|
|
8613
8631
|
}
|
|
8614
8632
|
function parseRichInternalKeyValue(line) {
|
|
8615
8633
|
const separator = line.includes(':') ? ':' : ':';
|