diff --git a/src/components/ds/ExperimentalBadge.tsx b/src/components/ds/ExperimentalBadge.tsx index 5b52b4e..278a5f7 100644 --- a/src/components/ds/ExperimentalBadge.tsx +++ b/src/components/ds/ExperimentalBadge.tsx @@ -86,14 +86,13 @@ interface ExperimentalGateProps { export function ExperimentalGate({ feature, children, fallback }: ExperimentalGateProps) { const isEnabled = useFeatureFlags((s) => s[feature]); + const t = useTheme(); + const meta = FLAG_META[feature]; if (isEnabled) return <>{children}; if (fallback) return <>{fallback}; - const meta = FLAG_META[feature]; - const t = useTheme(); - return (
(matches: RoutedMatch m.metadata?.toolName ?? 'unknown').join(', ')}`); } - return parts.join(' -'); + return parts.join('\n'); } /** Estimate tokens for a string (rough approximation). */ diff --git a/src/graph/reactivePackerWrapper.ts b/src/graph/reactivePackerWrapper.ts index d5ce9dc..4f5dd6e 100644 --- a/src/graph/reactivePackerWrapper.ts +++ b/src/graph/reactivePackerWrapper.ts @@ -131,8 +131,7 @@ export function withReactiveCompaction( const contentStr = typeof item.content === 'string' ? item.content : ''; const truncatedLength = oldRatio > 0 ? Math.ceil(contentStr.length * (newRatio / oldRatio)) : contentStr.length; const truncatedContent = contentStr.length > truncatedLength - ? contentStr.slice(0, truncatedLength) + ' -[... truncated by reactive compaction]' + ? contentStr.slice(0, truncatedLength) + '\n[... truncated by reactive compaction]' : contentStr; return { ...item, depth: newDepthNumeric, tokens: newTokens, content: truncatedContent }; } diff --git a/src/panels/builder/ConstraintsSection.tsx b/src/panels/builder/ConstraintsSection.tsx index d6d0c65..722e335 100644 --- a/src/panels/builder/ConstraintsSection.tsx +++ b/src/panels/builder/ConstraintsSection.tsx @@ -44,8 +44,7 @@ export function ConstraintsSection({ onOpenModal }: { onOpenModal: (config: Cons
Custom Rules - {constraints.customConstraints.split(' -').filter(Boolean).map((rule: string, i: number) => ( + {constraints.customConstraints.split('\n').filter(Boolean).map((rule: string, i: number) => (
{rule} diff --git a/src/services/systemFrameBuilder.ts b/src/services/systemFrameBuilder.ts index fc14167..1696d81 100644 --- a/src/services/systemFrameBuilder.ts +++ b/src/services/systemFrameBuilder.ts @@ -46,8 +46,7 @@ export function buildProvenanceSection(provenance: ProvenanceSummary): string { lines.push(''); } - return lines.join(' -'); + return lines.join('\n'); } export function buildSystemFrame(provenance?: ProvenanceSummary): string { @@ -62,8 +61,7 @@ export function buildSystemFrame(provenance?: ProvenanceSummary): string { if (agentMeta.avatar) identity.push(`Avatar: ${agentMeta.avatar}`); if (agentMeta.tags?.length) identity.push(`Tags: ${agentMeta.tags.join(', ')}`); parts.push(` -${identity.join(' -')} +${identity.join('\n')} `); } @@ -80,17 +78,13 @@ ${identity.join(' lines.push(`Primary Objective: ${instructionState.objectives.primary}`); if (instructionState.objectives.successCriteria.length > 0) lines.push(`Success Criteria: -${instructionState.objectives.successCriteria.map(c => `- ${c}`).join(' -')}`); +${instructionState.objectives.successCriteria.map(c => `- ${c}`).join('\n')}`); if (instructionState.objectives.failureModes.length > 0) lines.push(`Failure Modes to Avoid: -${instructionState.objectives.failureModes.map(f => `- ${f}`).join(' -')}`); +${instructionState.objectives.failureModes.map(f => `- ${f}`).join('\n')}`); } parts.push(` -${lines.join(' - -')} +${lines.join('\n\n')} `); } @@ -106,8 +100,7 @@ ${lines.join(' if (instructionState.constraints.customConstraints) constraints.push(`Additional constraints: ${instructionState.constraints.customConstraints}`); if (constraints.length > 0) parts.push(` -${constraints.map(c => `- ${c}`).join(' -')} +${constraints.map(c => `- ${c}`).join('\n')} `); // Workflow @@ -128,9 +121,7 @@ ${compiled} parts.push(provenanceSection); } - return parts.join(' - -'); + return parts.join('\n\n'); } /** @@ -317,7 +308,6 @@ export function buildToolGuide(): string { } return ` -${lines.join(' -')} +${lines.join('\n')} `; }