Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4731,7 +4731,7 @@ <h3 data-i18n="login.title">控制台登录</h3>
weightLabel: '第四次出手 · 三件事打包修',
mergedAt: '2026-04-25',
title: 'fix: bring Claude Code tool-call flow back to Anthropic-equivalent behaviour',
summary: '一个 PR 解了三个独立 regression。① tool preamble 从 1600 字符瘦身到 330 字符 —— 老版本的 ### Tool / parameters schema: / ```json {…} 形态正是 Claude Code 自家 system prompt 的指纹,出现在 user 槽位时 Opus 4.7 会判 "pasted system prompt" 拒答。② redact 标记升到第 6 代单字符 U+2026 省略号 `…`:第 5 代 redacted internal path 仍被 Opus 塞进 cd redacted internal path && git ... 浪费 2-3 turn;新 marker 0 ASCII word char + 0 shell 元字符 + 训练数据里没 cd … 当真路径的样本,模型不会再当参数用。③ neutralizeCascadeIdentity 加 5 个新 pattern(Cascade is an? AI assistant / As Cascade / Codeium\\'s Cascade / built by Codeium / Cascade\\'s workspace),漏网的 Cascade 自称口吻全部封死。回归套装含 banned-shape regex 锁死未来不会再倒退到含 ASCII 字符的 marker。',
summary: '一个 PR 解了三个独立 regression。① tool preamble 从 1600 字符瘦身到 330 字符 —— 老版本的 ### Tool / parameters schema: / ```json {…} 形态正是 Claude Code 自家 system prompt 的指纹,出现在 user 槽位时 Opus 4.7 会判 "pasted system prompt" 拒答。② redact 标记升到第 6 代单字符 U+2026 省略号 `…`:第 5 代 redacted internal path 仍被 Opus 塞进 cd redacted internal path && git ... 浪费 2-3 turn;新 marker 0 ASCII word char + 0 shell 元字符 + 训练数据里没 cd … 当真路径的样本,模型不会再当参数用。③ neutralizeCascadeIdentity 加 5 个新 pattern(Cascade is an? AI assistant / As Cascade / Codeium\'s Cascade / built by Codeium / Cascade\'s workspace),漏网的 Cascade 自称口吻全部封死。回归套装含 banned-shape regex 锁死未来不会再倒退到含 ASCII 字符的 marker。',
},
{
login: 'aict666',
Expand Down
21 changes: 21 additions & 0 deletions test/dashboard-syntax.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'fs';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';

const __dirname = dirname(fileURLToPath(import.meta.url));
const root = join(__dirname, '..');

test('dashboard inline scripts are syntactically valid', () => {
const html = readFileSync(join(root, 'src/dashboard/index.html'), 'utf8');
const scripts = [...html.matchAll(/<script([^>]*)>([\s\S]*?)<\/script>/gi)]
.map((match, index) => ({ index, attrs: match[1] || '', source: match[2] || '' }))
.filter(({ attrs }) => !/\bsrc\s*=/.test(attrs))
.filter(({ attrs }) => !/\btype\s*=\s*["']module["']/i.test(attrs));

assert.ok(scripts.length > 0, 'expected at least one non-module inline script');
for (const { index, source } of scripts) {
assert.doesNotThrow(() => new Function(source), `inline script #${index} should parse`);
}
});
Loading