Repository navigation
feat(webui): 市场 World 卡片显示前缀与工具定义的 token 占用 #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,6 +218,9 @@ const zh = { | |
| promptsTabBot: '提示词模板', | ||
| toolCount: (n: number) => `${n} 个工具`, | ||
| eventCount: (n: number) => `${n} 种事件`, | ||
| toolsHint: (n: number, tokens: number) => `包含 ${n} 个工具,工具定义占用了约 ${tokens} token`, | ||
| prefixSize: (tokens: string) => `前缀 ≈${tokens}`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 界面把环境提示词的 token 数标成了「前缀」。 AGENTS.md §4 AI slop checklist:Accuracy after editing。本仓库里
按清单核对准了边界再留。 — Cortico PR Gate via Cursor Cloud Agent |
||
| prefixHint: (tokens: number) => `环境提示词占用了约 ${tokens} token`, | ||
| worldCount: (n: number) => `${n} 个 World`, | ||
| sectionWorld: '工具与事件', | ||
| sectionProvider: '接入方式', | ||
|
|
@@ -453,6 +456,9 @@ export const en: typeof zh = { | |
| promptsTabBot: 'Prompt templates', | ||
| toolCount: (n: number) => `${n} tools`, | ||
| eventCount: (n: number) => `${n} event types`, | ||
| toolsHint: (n: number, tokens: number) => `Includes ${n} tools; their definitions take about ${tokens} tokens`, | ||
| prefixSize: (tokens: string) => `Prefix ≈${tokens}`, | ||
| prefixHint: (tokens: number) => `The environment prompt takes about ${tokens} tokens`, | ||
| worldCount: (n: number) => `${n} Worlds`, | ||
| sectionWorld: 'Tools and events', | ||
| sectionProvider: 'Connection', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,6 +255,10 @@ export interface ExtensionSearchHit { | |
| export interface ExtensionSummary { | ||
| tools?: number; | ||
| events?: number; | ||
| /** 全部声明工具的定义估算的 token 数。 */ | ||
| toolTokens?: number; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 文档所有权未对齐。 AGENTS.md §8:「The commit that changes the owner changes the page.」 本 PR 在 — Cortico PR Gate via Cursor Cloud Agent |
||
| /** 环境提示词模板原文估算的 token 数。 */ | ||
| envPromptTokens?: number; | ||
| protocols?: string[]; | ||
| auth?: ProviderAuth[]; | ||
| input?: Array<ProviderDescribe['input'][number]>; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
悬停文案的前半句是卡片上已经写着的工具数。
AGENTS.md §4 AI slop checklist:Obvious information(Remove common knowledge and instructions evident from the UI)。
src/web/client/features/extensions/strings.ts:包含 ${n} 个工具,工具定义占用了约 ${tokens} tokenIncludes ${n} tools; their definitions take about ${tokens} tokens按清单删除界面上已有的部分。
— Cortico PR Gate via Cursor Cloud Agent