chore(ui): drop the Change Loop panel and detail-head status badge

This commit is contained in:
NI0317
2026-07-19 21:54:29 +08:00
parent 88544d9c1b
commit 7a5f0b0827
2 changed files with 5 additions and 83 deletions

View File

@@ -91,10 +91,10 @@ type PayloadFormat = 'plain' | 'json' | 'jsonl' | 'yaml'
interface DevArtifact {
readonly id: string
readonly group: 'Prompts' | 'Tools' | 'Plugins / Context Providers' | 'Config / Runtime' | 'Change Loop'
readonly group: 'Prompts' | 'Tools' | 'Plugins / Context Providers' | 'Config / Runtime'
readonly title: string
readonly subtitle: string
readonly kind: 'prompt' | 'tool' | 'plugin' | 'config' | 'runtime' | 'change' | 'source'
readonly kind: 'prompt' | 'tool' | 'plugin' | 'config' | 'runtime' | 'source'
readonly status?: string
readonly source?: string
readonly owner?: string
@@ -1885,8 +1885,7 @@ function devGroupLabel(group: DevArtifact['group']): string {
if (group === 'Prompts') return t('dev.group.prompts')
if (group === 'Tools') return t('dev.group.tools')
if (group === 'Plugins / Context Providers') return t('dev.group.plugins')
if (group === 'Config / Runtime') return t('dev.group.config')
return t('dev.group.changeLoop')
return t('dev.group.config')
}
function devListSubtitle(artifact: DevArtifact): string {
@@ -1915,7 +1914,6 @@ function renderDevArtifactDetail(artifact: DevArtifact): string {
</div>
<div class="dev-detail-actions">
${editablePath === undefined ? '' : `<button type="button" data-open-path="${escapeHtml(editablePath)}">${escapeHtml(t('dev.openInEditor'))}</button>`}
<em>${escapeHtml(artifact.status ?? artifact.kind)}</em>
</div>
</header>
<section class="dev-detail-grid">
@@ -1929,7 +1927,6 @@ function renderDevArtifactDetail(artifact: DevArtifact): string {
${artifact.kind === 'prompt' ? renderDevRegistrySnapshot() : ''}
${artifact.metadata === undefined ? '' : renderDevCodePanel(t('dev.metadata'), t('dev.metadataSubtitle'), artifact.metadata)}
${artifact.kind === 'runtime' ? renderRuntimePanel() : ''}
${artifact.kind === 'change' ? renderChangeLoopPanel() : ''}
</article>
`
}
@@ -1974,8 +1971,7 @@ function contentTitleForArtifact(artifact: DevArtifact): string {
if (artifact.kind === 'plugin') return t('dev.pluginContribution')
if (artifact.kind === 'source') return t('dev.sourceFileContent')
if (artifact.kind === 'config') return t('dev.activeConfiguration')
if (artifact.kind === 'runtime') return t('dev.runtimeState')
return t('dev.suggestedLoop')
return t('dev.runtimeState')
}
function contentMetaForArtifact(artifact: DevArtifact): string {
@@ -1984,30 +1980,14 @@ function contentMetaForArtifact(artifact: DevArtifact): string {
if (artifact.kind === 'plugin') return t('dev.pluginMeta')
if (artifact.kind === 'source') return t('dev.sourceMeta')
if (artifact.kind === 'config') return t('dev.configMeta')
if (artifact.kind === 'runtime') return t('dev.runtimeMeta')
return t('dev.loopMeta')
return t('dev.runtimeMeta')
}
function reloadLabelForArtifact(artifact: DevArtifact): string {
if (artifact.kind === 'runtime') return t('dev.manualRestart')
if (artifact.kind === 'change') return String(asRecord(state.dev).restartNeeded ?? false) === 'true' ? t('dev.restartRecommended') : t('dev.noRestartSignal')
return t('dev.restartAfterEdit')
}
function renderChangeLoopPanel(): string {
return `
<section class="dev-loop-card">
<strong>${escapeHtml(t('dev.recommendedLoop'))}</strong>
<ol>
<li>${escapeHtml(t('dev.loopStepEdit'))}</li>
<li>${escapeHtml(t('dev.loopStepRestart'))}</li>
<li>${escapeHtml(t('dev.loopStepRerun'))}</li>
<li>${escapeHtml(t('dev.loopStepCompare'))}</li>
</ol>
</section>
`
}
function renderRuntimePanel(): string {
return `
<section class="module-card dev-status">
@@ -2133,34 +2113,11 @@ function developArtifactGroups(): DevArtifactGroup[] {
recent: String(asRecord(state.runtime).pid ?? t('dev.noPid')),
},
]
const changeArtifacts: DevArtifact[] = [
{
id: 'change:loop',
group: 'Change Loop',
kind: 'change',
title: t('dev.modifyReloadRerun'),
subtitle: t('dev.modifyReloadRerunSubtitle'),
status: String(dev.restartNeeded ?? false) === 'true' ? t('dev.statusRestartNeeded') : t('dev.statusReady'),
source: runtimeRepoRoot(),
owner: 'DeepSeek Harness desktop',
value: {
git: dev.git,
restartNeeded: dev.restartNeeded ?? false,
suggestedNextRun: state.selectedSessionId === undefined ? t('dev.startChatThenInspect') : `${t('dev.rerunOrContinue')} ${state.selectedSessionId}`,
},
metadata: {
selectedSessionId: state.selectedSessionId,
sessionsAvailable: state.sessions.length,
},
recent: gitSummary(),
},
]
return [
{ title: 'Prompts', artifacts: [...promptArtifacts, ...promptSources] },
{ title: 'Tools', artifacts: [...toolArtifacts, ...toolSources] },
{ title: 'Plugins / Context Providers', artifacts: [...pluginArtifacts, ...compositionSources] },
{ title: 'Config / Runtime', artifacts: configArtifacts },
{ title: 'Change Loop', artifacts: changeArtifacts },
]
}
@@ -2451,9 +2408,6 @@ function gitField(key: string): string {
return String(git[key] ?? t('dev.unknown'))
}
function gitSummary(): string {
return `${gitField('branch')} @ ${gitField('commit')}${gitField('dirty') === 'true' ? ` · ${t('app.dirty')}` : ''}`
}
function asSessionUpdate(value: unknown): SessionUpdatePayload {
const record = asRecord(value)

View File

@@ -183,29 +183,19 @@ const messages = {
'dev.pluginContribution': '插件配置 / 贡献',
'dev.activeConfiguration': '当前配置',
'dev.runtimeState': '运行时状态',
'dev.suggestedLoop': '建议验证循环',
'dev.promptMeta': '当前源码级提示词文本或提示词归属信息',
'dev.toolMeta': '模型请求最近一次看到的已注册 schema',
'dev.pluginMeta': '基于当前 Cordis 配置识别提示词/上下文注入者和工具注册者',
'dev.sourceMeta': '当前运行时组合暴露的源码事实,用于定位实现和修改入口',
'dev.configMeta': '模型/运行时参数,以及修改后需要重载的文件',
'dev.runtimeMeta': '当前 Electron 主进程和 ACP 桥接状态',
'dev.loopMeta': '编辑智能体后如何重新运行并对比',
'dev.manualRestart': '这里可以手动重启',
'dev.restartRecommended': '建议重启',
'dev.noRestartSignal': '没有重启信号',
'dev.restartAfterEdit': '编辑后重启 ACP',
'dev.recommendedLoop': '推荐循环',
'dev.loopStepEdit': '修改提示词、工具、插件或配置源文件。',
'dev.loopStepRestart': '如果修改的文件是在进程启动时加载的,就重启 ACP 运行时。',
'dev.loopStepRerun': '回到聊天,重新运行历史任务或开始新任务。',
'dev.loopStepCompare': '用轨迹 / 瀑布图对比行为和耗时证据。',
'dev.restartRuntime': '重启 ACP 运行时',
'dev.group.prompts': '提示词',
'dev.group.tools': '工具',
'dev.group.plugins': '插件 / 上下文提供者',
'dev.group.config': '配置 / 运行时',
'dev.group.changeLoop': '变更循环',
'dev.requestSystemPrompt': '当前请求的系统提示词',
'dev.requestSystemPromptSubtitle': '最近一次模型请求实际收到的完整系统提示词',
'dev.noRequestSystemPrompt': '还没有从当前会话的请求头里看到系统提示词。先在聊天里运行一次任务,再回到这里查看。',
@@ -219,20 +209,14 @@ const messages = {
'dev.activeCordisSubtitle': '桌面 ACP 运行时在进程启动时加载的 Cordis 组合',
'dev.acpRuntime': 'ACP 运行时',
'dev.acpRuntimeSubtitle': '聊天和轨迹捕获使用的托管后端进程',
'dev.modifyReloadRerun': '修改、重载、重跑',
'dev.modifyReloadRerunSubtitle': '编辑 Harness、插件、提示词、工具或配置之后的产品循环',
'dev.statusActive': '已启用',
'dev.statusMissing': '缺失',
'dev.statusSource': '源码',
'dev.statusRegistered': '已注册',
'dev.statusProvider': '提供者',
'dev.statusReady': '就绪',
'dev.statusRestartNeeded': '需要重启',
'dev.noPersona': '当前配置里没有找到身份设定片段。',
'dev.noConfigText': '开发后端没有返回配置文本。',
'dev.noPid': '没有 pid',
'dev.startChatThenInspect': '先开始一个聊天任务,然后检查它的轨迹/瀑布图。',
'dev.rerunOrContinue': '重新运行或继续会话',
'dev.registeredModelTool': '已注册的模型可见工具',
'dev.toolProviderPlugin': '工具提供插件',
'dev.noMatchingPlugin': '没有从当前配置推断出匹配插件',
@@ -459,23 +443,14 @@ const messages = {
'dev.pluginContribution': 'Plugin config / contribution',
'dev.activeConfiguration': 'Active configuration',
'dev.runtimeState': 'Runtime state',
'dev.suggestedLoop': 'Suggested verification loop',
'dev.promptMeta': 'Current source-level prompt text or prompt owner metadata',
'dev.toolMeta': 'Current registered schema when last seen by a model request',
'dev.pluginMeta': 'Who injects prompt/context or registers tools, based on active Cordis config',
'dev.sourceMeta': 'Source-level evidence from the active runtime composition, useful for locating implementation and edit entry points',
'dev.configMeta': 'Model/runtime parameters and files whose edits require reload',
'dev.runtimeMeta': 'Current Electron main process and ACP bridge state',
'dev.loopMeta': 'How to rerun and compare after editing the agent',
'dev.manualRestart': 'Manual restart available here',
'dev.restartRecommended': 'Restart recommended',
'dev.noRestartSignal': 'No restart signal',
'dev.restartAfterEdit': 'Restart ACP after editing',
'dev.recommendedLoop': 'Recommended loop',
'dev.loopStepEdit': 'Edit the prompt, tool, plugin, or config source.',
'dev.loopStepRestart': 'Restart ACP runtime if the changed file is loaded at process start.',
'dev.loopStepRerun': 'Return to Chat and rerun a previous task or start a new one.',
'dev.loopStepCompare': 'Use Trajectory / Waterfall to compare behavior and timing evidence.',
'dev.restartRuntime': 'Restart ACP runtime',
'dev.requestSystemPrompt': 'Current request system prompt',
'dev.requestSystemPromptSubtitle': 'The full system prompt actually sent in the latest model request',
@@ -486,7 +461,6 @@ const messages = {
'dev.group.tools': 'Tools',
'dev.group.plugins': 'Plugins / Context Providers',
'dev.group.config': 'Config / Runtime',
'dev.group.changeLoop': 'Change Loop',
'dev.systemPersona': 'System persona',
'dev.systemPersonaSubtitle': 'Current deployment persona forwarded from cordis.yml',
'dev.promptAssemblyService': 'Prompt assembly service',
@@ -495,20 +469,14 @@ const messages = {
'dev.activeCordisSubtitle': 'Process-start Cordis composition loaded by the desktop ACP runtime',
'dev.acpRuntime': 'ACP runtime',
'dev.acpRuntimeSubtitle': 'Managed backend process used by Chat and trace capture',
'dev.modifyReloadRerun': 'Modify, reload, rerun',
'dev.modifyReloadRerunSubtitle': 'The product loop after editing Harness, plugins, prompts, tools, or config',
'dev.statusActive': 'active',
'dev.statusMissing': 'missing',
'dev.statusSource': 'source',
'dev.statusRegistered': 'registered',
'dev.statusProvider': 'provider',
'dev.statusReady': 'ready',
'dev.statusRestartNeeded': 'restart needed',
'dev.noPersona': 'No persona block found in the active config.',
'dev.noConfigText': 'No config text reported by dev backend.',
'dev.noPid': 'No pid',
'dev.startChatThenInspect': 'Start a chat task, then inspect its trajectory/waterfall.',
'dev.rerunOrContinue': 'Rerun or continue session',
'dev.registeredModelTool': 'Registered model-facing tool',
'dev.toolProviderPlugin': 'Tool provider plugin',
'dev.noMatchingPlugin': 'No matching plugin inferred from active config',