feat(panel): add conversation turn rail, prompt preview, and decoupled step toggles

- Track user input turn boundaries and prompt previews in extractModelSteps while stripping compaction summary headers
- Align interleaved main and subagent steps onto unified rootTurnIndex in telemetry-builder and scope lazy cache refresh to the active session family
- Render dynamic left-edge turn rail and viewport-clamped prompt tooltip in StepsDetailView across arbitrary custom column orders
- Decouple [主]/[子] agent badges from step index and add independent switches for Turn Rail and Agent Badge under Preferences -> Structure

Co-authored-by: Swei <sweilo@qq.com>
This commit is contained in:
fish
2026-11-15 16:55:26 +09:00
co-authored by Swei
parent f2a68c6d82
commit 228031e335
17 changed files with 1350 additions and 54 deletions
@@ -63,7 +63,7 @@ export const STEP_COLUMN_REGISTRY = Object.freeze({
thLabel: () => t('stepCol.step.th'),
optLabel: () => t('stepCol.step.opt'),
sigPart: (st, ctx) =>
`${ctx.hasSubagents}:${ctx.scopeSigKey}:${st.agentId || 'main'}:${st.stepIndex}:${st.agentBadge || ''}:${st.agentLabel || ''}`,
`${Boolean(ctx.showAgentBadge)}:${ctx.scopeSigKey}:${st.agentId || 'main'}:${st.stepIndex}:${st.agentBadge || ''}:${st.agentLabel || ''}`,
createCell: () => {
const agentBadgeEl = h('span', {
className: 'agent-badge is-clickable',
@@ -75,9 +75,9 @@ export const STEP_COLUMN_REGISTRY = Object.freeze({
return { td, refs: { agentBadgeEl, stepNumText } };
},
updateCell: (refs, st, ctx) => {
const { hasSubagents, effectiveScopes, onSelectAgentScopes } = ctx;
patchAttr(refs.agentBadgeEl, 'hidden', !hasSubagents);
if (hasSubagents) {
const { showAgentBadge, effectiveScopes, onSelectAgentScopes } = ctx;
patchAttr(refs.agentBadgeEl, 'hidden', !showAgentBadge);
if (showAgentBadge) {
const badgeCls = getAgentBadgeClass(st.agentIndex || 0, !st.isSubagent);
patchAttr(refs.agentBadgeEl, 'class', `agent-badge is-clickable ${badgeCls}`);
const badgeText = isEnglishLocale()
@@ -117,6 +117,8 @@ export const STEP_COLUMN_REGISTRY = Object.freeze({
onSelectAgentScopes(isSoleTarget ? ['all'] : [targetScope]);
}
};
} else {
refs.agentBadgeEl.onclick = null;
}
patchText(refs.stepNumText, `#${Number(st.stepIndex)}`);
},