claude-code-workflow 6.3.54 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/action-planning-agent.md +332 -187
- package/.claude/agents/cli-execution-agent.md +13 -12
- package/.claude/agents/cli-explore-agent.md +66 -11
- package/.claude/agents/cli-lite-planning-agent.md +908 -892
- package/.claude/agents/cli-roadmap-plan-agent.md +1001 -0
- package/.claude/agents/code-developer.md +75 -85
- package/.claude/agents/conceptual-planning-agent.md +49 -19
- package/.claude/agents/context-search-agent.md +96 -19
- package/.claude/agents/debug-explore-agent.md +439 -436
- package/.claude/agents/issue-plan-agent.md +15 -11
- package/.claude/agents/memory-bridge.md +2 -2
- package/.claude/agents/tdd-developer.md +84 -107
- package/.claude/agents/team-worker.md +440 -0
- package/.claude/agents/test-action-planning-agent.md +684 -0
- package/.claude/agents/test-fix-agent.md +24 -12
- package/.claude/agents/ui-design-agent.md +3 -3
- package/.claude/agents/universal-executor.md +1 -1
- package/.claude/commands/ccw-coordinator.md +316 -62
- package/.claude/commands/ccw.md +502 -172
- package/.claude/commands/cli/cli-init.md +441 -441
- package/.claude/commands/flow-create.md +16 -25
- package/.claude/commands/issue/convert-to-plan.md +21 -19
- package/.claude/commands/issue/discover-by-prompt.md +2 -2
- package/.claude/commands/issue/discover.md +4 -4
- package/.claude/commands/issue/execute.md +43 -15
- package/.claude/commands/issue/from-brainstorm.md +5 -5
- package/.claude/commands/issue/plan.md +335 -335
- package/.claude/commands/issue/queue.md +1 -1
- package/.claude/commands/memory/prepare.md +240 -0
- package/.claude/commands/memory/style-skill-memory.md +2 -2
- package/.claude/commands/workflow/analyze-with-file.md +639 -667
- package/.claude/commands/workflow/brainstorm-with-file.md +779 -1153
- package/.claude/commands/workflow/clean.md +572 -548
- package/.claude/commands/workflow/collaborative-plan-with-file.md +635 -761
- package/.claude/commands/workflow/debug-with-file.md +648 -672
- package/.claude/commands/workflow/init-guidelines.md +447 -0
- package/.claude/commands/workflow/init-specs.md +380 -0
- package/.claude/commands/workflow/init.md +291 -224
- package/.claude/commands/workflow/integration-test-cycle.md +932 -0
- package/.claude/commands/workflow/refactor-cycle.md +852 -0
- package/.claude/commands/workflow/roadmap-with-file.md +544 -0
- package/.claude/commands/workflow/session/complete.md +139 -203
- package/.claude/commands/workflow/session/solidify.md +453 -303
- package/.claude/commands/workflow/session/start.md +202 -202
- package/.claude/commands/workflow/session/sync.md +201 -0
- package/.claude/commands/workflow/ui-design/codify-style.md +20 -20
- package/.claude/commands/workflow/ui-design/design-sync.md +7 -7
- package/.claude/commands/workflow/ui-design/explore-auto.md +16 -16
- package/.claude/commands/workflow/ui-design/generate.md +1 -1
- package/.claude/commands/workflow/ui-design/imitate-auto.md +19 -19
- package/.claude/commands/workflow/ui-design/import-from-code.md +540 -540
- package/.claude/commands/workflow/unified-execute-with-file.md +864 -889
- package/.claude/scripts/cleanup-ghost-commands.mjs +402 -0
- package/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md +741 -0
- package/.claude/skills/brainstorm/SKILL.md +382 -0
- package/.claude/skills/brainstorm/phases/01-mode-routing.md +207 -0
- package/.claude/skills/brainstorm/phases/02-artifacts.md +457 -0
- package/.claude/skills/brainstorm/phases/03-role-analysis.md +718 -0
- package/.claude/skills/brainstorm/phases/04-synthesis.md +817 -0
- package/.claude/skills/ccw-help/SKILL.md +176 -176
- package/.claude/skills/ccw-help/index/all-commands.json +376 -805
- package/.claude/skills/ccw-help/index/by-category.json +400 -833
- package/.claude/skills/ccw-help/index/by-use-case.json +388 -819
- package/.claude/skills/ccw-help/index/command-relationships.json +15 -160
- package/.claude/skills/ccw-help/index/essential-commands.json +13 -90
- package/.claude/skills/command-generator/SKILL.md +190 -0
- package/.claude/skills/command-generator/phases/01-parameter-validation.md +174 -0
- package/.claude/skills/command-generator/phases/02-target-path-resolution.md +171 -0
- package/.claude/skills/command-generator/phases/03-template-loading.md +123 -0
- package/.claude/skills/command-generator/phases/04-content-formatting.md +184 -0
- package/.claude/skills/command-generator/phases/05-file-generation.md +185 -0
- package/.claude/skills/command-generator/specs/command-design-spec.md +160 -0
- package/.claude/skills/command-generator/templates/command-md.md +75 -0
- package/.claude/skills/issue-manage/SKILL.md +291 -285
- package/.claude/skills/memory-capture/SKILL.md +129 -0
- package/.claude/skills/memory-capture/phases/01-compact.md +254 -0
- package/.claude/skills/memory-capture/phases/02-tips.md +206 -0
- package/.claude/skills/memory-manage/SKILL.md +229 -0
- package/.claude/skills/memory-manage/phases/01-update-full.md +316 -0
- package/.claude/skills/memory-manage/phases/02-update-related.md +267 -0
- package/.claude/skills/memory-manage/phases/03-update-single.md +306 -0
- package/.claude/skills/memory-manage/phases/04-docs-full.md +435 -0
- package/.claude/skills/memory-manage/phases/05-docs-related.md +315 -0
- package/.claude/skills/review-cycle/SKILL.md +128 -0
- package/.claude/skills/review-cycle/phases/review-fix.md +760 -0
- package/.claude/skills/review-cycle/phases/review-module.md +764 -0
- package/.claude/skills/review-cycle/phases/review-session.md +775 -0
- package/.claude/skills/skill-generator/templates/llm-action.md +3 -3
- package/.claude/skills/spec-generator/README.md +81 -0
- package/.claude/skills/spec-generator/SKILL.md +290 -0
- package/.claude/skills/spec-generator/phases/01-5-requirement-clarification.md +404 -0
- package/.claude/skills/spec-generator/phases/01-discovery.md +242 -0
- package/.claude/skills/spec-generator/phases/02-product-brief.md +247 -0
- package/.claude/skills/spec-generator/phases/03-requirements.md +179 -0
- package/.claude/skills/spec-generator/phases/04-architecture.md +213 -0
- package/.claude/skills/spec-generator/phases/05-epics-stories.md +168 -0
- package/.claude/skills/spec-generator/phases/06-readiness-check.md +449 -0
- package/.claude/skills/spec-generator/specs/document-standards.md +248 -0
- package/.claude/skills/spec-generator/specs/quality-gates.md +219 -0
- package/.claude/skills/spec-generator/templates/architecture-doc.md +254 -0
- package/.claude/skills/spec-generator/templates/epics-template.md +196 -0
- package/.claude/skills/spec-generator/templates/product-brief.md +133 -0
- package/.claude/skills/spec-generator/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-brainstorm/SKILL.md +407 -0
- package/.claude/skills/team-brainstorm/roles/challenger.md +167 -0
- package/.claude/skills/team-brainstorm/roles/coordinator.md +257 -0
- package/.claude/skills/team-brainstorm/roles/evaluator.md +157 -0
- package/.claude/skills/team-brainstorm/roles/ideator.md +160 -0
- package/.claude/skills/team-brainstorm/roles/synthesizer.md +168 -0
- package/.claude/skills/team-brainstorm/specs/team-config.json +86 -0
- package/.claude/skills/team-coordinate/SKILL.md +445 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +197 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +85 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +296 -0
- package/.claude/skills/team-coordinate/roles/coordinator/role.md +283 -0
- package/.claude/skills/team-coordinate/specs/role-template.md +434 -0
- package/.claude/skills/team-coordinate/subagents/discuss-subagent.md +133 -0
- package/.claude/skills/team-coordinate/subagents/explore-subagent.md +120 -0
- package/.claude/skills/team-coordinate-v2/SKILL.md +265 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md +185 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md +87 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md +301 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/role.md +297 -0
- package/.claude/skills/team-coordinate-v2/specs/role-spec-template.md +295 -0
- package/.claude/skills/team-coordinate-v2/subagents/discuss-subagent.md +133 -0
- package/.claude/skills/team-coordinate-v2/subagents/explore-subagent.md +120 -0
- package/.claude/skills/team-executor/SKILL.md +372 -0
- package/.claude/skills/team-executor/roles/executor/commands/monitor.md +277 -0
- package/.claude/skills/team-executor/roles/executor/role.md +202 -0
- package/.claude/skills/team-executor/specs/session-schema.md +272 -0
- package/.claude/skills/team-executor-v2/SKILL.md +215 -0
- package/.claude/skills/team-executor-v2/roles/executor/commands/monitor.md +239 -0
- package/.claude/skills/team-executor-v2/roles/executor/role.md +171 -0
- package/.claude/skills/team-executor-v2/specs/session-schema.md +264 -0
- package/.claude/skills/team-frontend/SKILL.md +426 -0
- package/.claude/skills/team-frontend/roles/analyst/commands/design-intelligence.md +150 -0
- package/.claude/skills/team-frontend/roles/analyst/role.md +225 -0
- package/.claude/skills/team-frontend/roles/architect/role.md +219 -0
- package/.claude/skills/team-frontend/roles/coordinator/role.md +257 -0
- package/.claude/skills/team-frontend/roles/developer/role.md +238 -0
- package/.claude/skills/team-frontend/roles/qa/commands/pre-delivery-checklist.md +116 -0
- package/.claude/skills/team-frontend/roles/qa/role.md +257 -0
- package/.claude/skills/team-frontend/specs/team-config.json +84 -0
- package/.claude/skills/team-issue/SKILL.md +425 -0
- package/.claude/skills/team-issue/roles/coordinator.md +340 -0
- package/.claude/skills/team-issue/roles/explorer.md +212 -0
- package/.claude/skills/team-issue/roles/implementer.md +322 -0
- package/.claude/skills/team-issue/roles/integrator.md +241 -0
- package/.claude/skills/team-issue/roles/planner.md +207 -0
- package/.claude/skills/team-issue/roles/reviewer.md +268 -0
- package/.claude/skills/team-issue/specs/team-config.json +70 -0
- package/.claude/skills/team-iterdev/SKILL.md +493 -0
- package/.claude/skills/team-iterdev/roles/architect.md +265 -0
- package/.claude/skills/team-iterdev/roles/coordinator.md +423 -0
- package/.claude/skills/team-iterdev/roles/developer.md +280 -0
- package/.claude/skills/team-iterdev/roles/reviewer.md +307 -0
- package/.claude/skills/team-iterdev/roles/tester.md +253 -0
- package/.claude/skills/team-iterdev/specs/team-config.json +172 -0
- package/.claude/skills/team-lifecycle-v3/SKILL.md +384 -0
- package/.claude/skills/team-lifecycle-v3/roles/analyst/role.md +113 -0
- package/.claude/skills/team-lifecycle-v3/roles/architect/commands/assess.md +193 -0
- package/.claude/skills/team-lifecycle-v3/roles/architect/role.md +103 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/commands/dispatch.md +142 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/commands/monitor.md +180 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md +209 -0
- package/.claude/skills/team-lifecycle-v3/roles/discussant/commands/critique.md +136 -0
- package/.claude/skills/team-lifecycle-v3/roles/discussant/role.md +128 -0
- package/.claude/skills/team-lifecycle-v3/roles/executor/commands/implement.md +166 -0
- package/.claude/skills/team-lifecycle-v3/roles/executor/role.md +103 -0
- package/.claude/skills/team-lifecycle-v3/roles/explorer/role.md +91 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-developer/role.md +111 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-qa/commands/pre-delivery-checklist.md +152 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-qa/role.md +113 -0
- package/.claude/skills/team-lifecycle-v3/roles/planner/commands/explore.md +154 -0
- package/.claude/skills/team-lifecycle-v3/roles/planner/role.md +120 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/commands/code-review.md +163 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/commands/spec-quality.md +202 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/role.md +104 -0
- package/.claude/skills/team-lifecycle-v3/roles/tester/commands/validate.md +152 -0
- package/.claude/skills/team-lifecycle-v3/roles/tester/role.md +108 -0
- package/.claude/skills/team-lifecycle-v3/roles/writer/commands/generate-doc.md +187 -0
- package/.claude/skills/team-lifecycle-v3/roles/writer/role.md +96 -0
- package/.claude/skills/team-lifecycle-v3/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v3/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v3/specs/team-config.json +158 -0
- package/.claude/skills/team-lifecycle-v3/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v3/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v3/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v3/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-lifecycle-v4/SKILL.md +643 -0
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +174 -0
- package/.claude/skills/team-lifecycle-v4/roles/architect/commands/assess.md +193 -0
- package/.claude/skills/team-lifecycle-v4/roles/architect/role.md +103 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +198 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +413 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +230 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +166 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/role.md +103 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-developer/role.md +111 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-qa/commands/pre-delivery-checklist.md +152 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-qa/role.md +113 -0
- package/.claude/skills/team-lifecycle-v4/roles/planner/commands/explore.md +172 -0
- package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +139 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/code-review.md +163 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/spec-quality.md +202 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/role.md +150 -0
- package/.claude/skills/team-lifecycle-v4/roles/tester/commands/validate.md +152 -0
- package/.claude/skills/team-lifecycle-v4/roles/tester/role.md +108 -0
- package/.claude/skills/team-lifecycle-v4/roles/writer/commands/generate-doc.md +192 -0
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +246 -0
- package/.claude/skills/team-lifecycle-v4/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v4/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v4/specs/team-config.json +200 -0
- package/.claude/skills/team-lifecycle-v4/subagents/discuss-subagent.md +169 -0
- package/.claude/skills/team-lifecycle-v4/subagents/doc-generation-subagent.md +62 -0
- package/.claude/skills/team-lifecycle-v4/subagents/explore-subagent.md +172 -0
- package/.claude/skills/team-lifecycle-v4/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v4/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v4/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-lifecycle-v5/SKILL.md +320 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/analyst.md +93 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/architect.md +76 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/executor.md +67 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/fe-developer.md +79 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/fe-qa.md +79 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/planner.md +98 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/reviewer.md +94 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/tester.md +76 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/writer.md +126 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/commands/dispatch.md +178 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/commands/monitor.md +237 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/role.md +194 -0
- package/.claude/skills/team-lifecycle-v5/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v5/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v5/specs/team-config.json +218 -0
- package/.claude/skills/team-lifecycle-v5/subagents/discuss-subagent.md +169 -0
- package/.claude/skills/team-lifecycle-v5/subagents/doc-generation-subagent.md +62 -0
- package/.claude/skills/team-lifecycle-v5/subagents/explore-subagent.md +172 -0
- package/.claude/skills/team-lifecycle-v5/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v5/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v5/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v5/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-planex/SKILL.md +439 -0
- package/.claude/skills/team-planex/roles/executor.md +356 -0
- package/.claude/skills/team-planex/roles/planner.md +315 -0
- package/.claude/skills/team-quality-assurance/SKILL.md +466 -0
- package/.claude/skills/team-quality-assurance/roles/analyst/commands/quality-report.md +360 -0
- package/.claude/skills/team-quality-assurance/roles/analyst/role.md +186 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +169 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +336 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/role.md +195 -0
- package/.claude/skills/team-quality-assurance/roles/executor/commands/run-fix-cycle.md +220 -0
- package/.claude/skills/team-quality-assurance/roles/executor/role.md +179 -0
- package/.claude/skills/team-quality-assurance/roles/generator/commands/generate-tests.md +258 -0
- package/.claude/skills/team-quality-assurance/roles/generator/role.md +172 -0
- package/.claude/skills/team-quality-assurance/roles/scout/commands/scan.md +216 -0
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +244 -0
- package/.claude/skills/team-quality-assurance/roles/strategist/commands/analyze-scope.md +221 -0
- package/.claude/skills/team-quality-assurance/roles/strategist/role.md +166 -0
- package/.claude/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.claude/skills/team-review/SKILL.md +264 -0
- package/.claude/skills/team-review/roles/coordinator/commands/dispatch.md +145 -0
- package/.claude/skills/team-review/roles/coordinator/commands/monitor.md +218 -0
- package/.claude/skills/team-review/roles/coordinator/role.md +244 -0
- package/.claude/skills/team-review/roles/fixer/commands/execute-fixes.md +163 -0
- package/.claude/skills/team-review/roles/fixer/commands/plan-fixes.md +187 -0
- package/.claude/skills/team-review/roles/fixer/role.md +247 -0
- package/.claude/skills/team-review/roles/reviewer/commands/deep-analyze.md +186 -0
- package/.claude/skills/team-review/roles/reviewer/commands/generate-report.md +174 -0
- package/.claude/skills/team-review/roles/reviewer/role.md +233 -0
- package/.claude/skills/team-review/roles/scanner/commands/semantic-scan.md +186 -0
- package/.claude/skills/team-review/roles/scanner/commands/toolchain-scan.md +187 -0
- package/.claude/skills/team-review/roles/scanner/role.md +255 -0
- package/.claude/skills/team-review/specs/dimensions.md +82 -0
- package/.claude/skills/team-review/specs/finding-schema.json +82 -0
- package/.claude/skills/team-review/specs/team-config.json +27 -0
- package/.claude/skills/team-roadmap-dev/SKILL.md +389 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/dispatch.md +213 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +378 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/pause.md +91 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/resume.md +138 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +287 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/role.md +237 -0
- package/.claude/skills/team-roadmap-dev/roles/executor/commands/implement.md +309 -0
- package/.claude/skills/team-roadmap-dev/roles/executor/role.md +220 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/commands/create-plans.md +362 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/commands/research.md +219 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/role.md +243 -0
- package/.claude/skills/team-roadmap-dev/roles/verifier/commands/verify.md +335 -0
- package/.claude/skills/team-roadmap-dev/roles/verifier/role.md +247 -0
- package/.claude/skills/team-roadmap-dev/specs/team-config.json +96 -0
- package/.claude/skills/team-tech-debt/SKILL.md +473 -0
- package/.claude/skills/team-tech-debt/roles/assessor/commands/evaluate.md +164 -0
- package/.claude/skills/team-tech-debt/roles/assessor/role.md +187 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +157 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +434 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/role.md +387 -0
- package/.claude/skills/team-tech-debt/roles/executor/commands/remediate.md +180 -0
- package/.claude/skills/team-tech-debt/roles/executor/role.md +228 -0
- package/.claude/skills/team-tech-debt/roles/planner/commands/create-plan.md +165 -0
- package/.claude/skills/team-tech-debt/roles/planner/role.md +190 -0
- package/.claude/skills/team-tech-debt/roles/scanner/commands/scan-debt.md +388 -0
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +225 -0
- package/.claude/skills/team-tech-debt/roles/validator/commands/verify.md +203 -0
- package/.claude/skills/team-tech-debt/roles/validator/role.md +237 -0
- package/.claude/skills/team-tech-debt/specs/team-config.json +132 -0
- package/.claude/skills/team-testing/SKILL.md +362 -0
- package/.claude/skills/team-testing/roles/analyst.md +265 -0
- package/.claude/skills/team-testing/roles/coordinator.md +304 -0
- package/.claude/skills/team-testing/roles/executor.md +300 -0
- package/.claude/skills/team-testing/roles/generator.md +272 -0
- package/.claude/skills/team-testing/roles/strategist.md +218 -0
- package/.claude/skills/team-testing/specs/team-config.json +93 -0
- package/.claude/skills/team-uidesign/SKILL.md +419 -0
- package/.claude/skills/team-uidesign/roles/coordinator.md +315 -0
- package/.claude/skills/team-uidesign/roles/designer.md +251 -0
- package/.claude/skills/team-uidesign/roles/implementer.md +280 -0
- package/.claude/skills/team-uidesign/roles/researcher.md +286 -0
- package/.claude/skills/team-uidesign/roles/reviewer.md +301 -0
- package/.claude/skills/team-uidesign/specs/team-config.json +107 -0
- package/.claude/skills/team-ultra-analyze/SKILL.md +444 -0
- package/.claude/skills/team-ultra-analyze/roles/analyst/commands/analyze.md +210 -0
- package/.claude/skills/team-ultra-analyze/roles/analyst/role.md +253 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md +237 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +461 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/role.md +354 -0
- package/.claude/skills/team-ultra-analyze/roles/discussant/commands/deepen.md +222 -0
- package/.claude/skills/team-ultra-analyze/roles/discussant/role.md +227 -0
- package/.claude/skills/team-ultra-analyze/roles/explorer/commands/explore.md +194 -0
- package/.claude/skills/team-ultra-analyze/roles/explorer/role.md +219 -0
- package/.claude/skills/team-ultra-analyze/roles/synthesizer/commands/synthesize.md +255 -0
- package/.claude/skills/team-ultra-analyze/roles/synthesizer/role.md +251 -0
- package/.claude/skills/team-ultra-analyze/specs/team-config.json +131 -0
- package/.claude/skills/workflow-execute/SKILL.md +625 -0
- package/.claude/skills/workflow-execute/phases/06-review.md +215 -0
- package/.claude/skills/workflow-lite-plan/SKILL.md +174 -0
- package/.claude/skills/workflow-lite-plan/phases/01-lite-plan.md +762 -0
- package/.claude/skills/workflow-lite-plan/phases/02-lite-execute.md +786 -0
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +163 -0
- package/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md +604 -0
- package/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md +788 -0
- package/.claude/skills/workflow-plan/SKILL.md +441 -0
- package/.claude/skills/workflow-plan/phases/01-session-discovery.md +99 -0
- package/.claude/skills/workflow-plan/phases/02-context-gathering.md +338 -0
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -0
- package/.claude/skills/workflow-plan/phases/04-task-generation.md +433 -0
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +391 -0
- package/.claude/skills/workflow-plan/phases/06-replan.md +594 -0
- package/.claude/skills/workflow-skill-designer/SKILL.md +496 -0
- package/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.claude/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.claude/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.claude/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/.claude/skills/workflow-tdd/SKILL.md +502 -0
- package/.claude/skills/workflow-tdd/phases/01-session-discovery.md +57 -0
- package/.claude/skills/workflow-tdd/phases/02-context-gathering.md +406 -0
- package/.claude/skills/workflow-tdd/phases/03-test-coverage-analysis.md +172 -0
- package/.claude/skills/workflow-tdd/phases/04-conflict-resolution.md +426 -0
- package/.claude/skills/workflow-tdd/phases/05-tdd-task-generation.md +472 -0
- package/.claude/skills/workflow-tdd/phases/06-tdd-structure-validation.md +189 -0
- package/.claude/skills/workflow-tdd/phases/07-tdd-verify.md +635 -0
- package/.claude/skills/workflow-test-fix/SKILL.md +458 -0
- package/.claude/skills/workflow-test-fix/phases/01-session-start.md +60 -0
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +492 -0
- package/.claude/skills/workflow-test-fix/phases/03-test-concept-enhanced.md +150 -0
- package/.claude/skills/workflow-test-fix/phases/04-test-task-generate.md +346 -0
- package/.claude/skills/workflow-test-fix/phases/05-test-cycle-execute.md +537 -0
- package/.codex/AGENTS.md +126 -122
- package/.codex/agents/action-planning-agent.md +88 -93
- package/.codex/agents/cli-execution-agent.md +4 -4
- package/.codex/agents/cli-explore-agent.md +56 -11
- package/.codex/agents/cli-lite-planning-agent.md +906 -736
- package/.codex/agents/code-developer.md +147 -38
- package/.codex/agents/conceptual-planning-agent.md +5 -5
- package/.codex/agents/context-search-agent.md +8 -4
- package/.codex/agents/issue-plan-agent.md +11 -11
- package/.codex/agents/memory-bridge.md +2 -2
- package/.codex/agents/tdd-developer.md +512 -0
- package/.codex/agents/test-action-planning-agent.md +684 -0
- package/.codex/agents/test-fix-agent.md +19 -7
- package/.codex/agents/ui-design-agent.md +3 -3
- package/.codex/prompts/prep-cycle.md +416 -0
- package/.codex/prompts/prep-plan.md +371 -0
- package/.codex/skills/analyze-with-file/EXECUTE.md +716 -0
- package/.codex/skills/analyze-with-file/SKILL.md +1049 -0
- package/.codex/skills/brainstorm-with-file/SKILL.md +1033 -0
- package/.codex/skills/clean/SKILL.md +421 -0
- package/.codex/skills/collaborative-plan-with-file/SKILL.md +822 -0
- package/.codex/skills/debug-with-file/SKILL.md +617 -0
- package/.codex/skills/issue-discover/SKILL.md +353 -0
- package/.codex/skills/issue-discover/phases/01-issue-new.md +334 -0
- package/.codex/skills/issue-discover/phases/02-discover.md +369 -0
- package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +531 -0
- package/.codex/skills/issue-discover/phases/04-quick-execute.md +241 -0
- package/.codex/skills/memory-compact/SKILL.md +381 -0
- package/.codex/skills/parallel-dev-cycle/SKILL.md +401 -0
- package/.codex/skills/parallel-dev-cycle/phases/00-prep-checklist.md +191 -0
- package/.codex/skills/parallel-dev-cycle/phases/01-session-init.md +261 -0
- package/.codex/skills/parallel-dev-cycle/phases/02-agent-execution.md +449 -0
- package/.codex/skills/parallel-dev-cycle/phases/03-result-aggregation.md +230 -0
- package/.codex/skills/parallel-dev-cycle/phases/04-completion-summary.md +109 -0
- package/.codex/skills/parallel-dev-cycle/roles/code-developer.md +392 -0
- package/.codex/skills/parallel-dev-cycle/roles/exploration-planner.md +352 -0
- package/.codex/skills/parallel-dev-cycle/roles/requirements-analyst.md +433 -0
- package/.codex/skills/parallel-dev-cycle/roles/validation-archivist.md +447 -0
- package/.codex/skills/review-cycle/SKILL.md +476 -0
- package/.codex/skills/review-cycle/phases/01-discovery-initialization.md +341 -0
- package/.codex/skills/review-cycle/phases/02-parallel-review.md +546 -0
- package/.codex/skills/review-cycle/phases/03-aggregation.md +74 -0
- package/.codex/skills/review-cycle/phases/04-iterative-deep-dive.md +333 -0
- package/.codex/skills/review-cycle/phases/05-review-completion.md +173 -0
- package/.codex/skills/review-cycle/phases/06-fix-discovery-batching.md +238 -0
- package/.codex/skills/review-cycle/phases/07-fix-parallel-planning.md +223 -0
- package/.codex/skills/review-cycle/phases/08-fix-execution.md +238 -0
- package/.codex/skills/review-cycle/phases/09-fix-completion.md +141 -0
- package/.codex/skills/roadmap-with-file/SKILL.md +898 -0
- package/.codex/skills/team-lifecycle/agents/analyst.md +424 -0
- package/.codex/skills/team-lifecycle/agents/architect.md +274 -0
- package/.codex/skills/team-lifecycle/agents/discuss-agent.md +422 -0
- package/.codex/skills/team-lifecycle/agents/executor.md +423 -0
- package/.codex/skills/team-lifecycle/agents/explore-agent.md +471 -0
- package/.codex/skills/team-lifecycle/agents/fe-developer.md +239 -0
- package/.codex/skills/team-lifecycle/agents/fe-qa.md +357 -0
- package/.codex/skills/team-lifecycle/agents/planner.md +437 -0
- package/.codex/skills/team-lifecycle/agents/reviewer.md +483 -0
- package/.codex/skills/team-lifecycle/agents/tester.md +423 -0
- package/.codex/skills/team-lifecycle/agents/writer.md +502 -0
- package/.codex/skills/team-lifecycle/orchestrator.md +817 -0
- package/.codex/skills/team-lifecycle/phases/01-requirement-clarification.md +209 -0
- package/.codex/skills/team-lifecycle/phases/02-team-initialization.md +205 -0
- package/.codex/skills/team-lifecycle/phases/03-task-chain-creation.md +251 -0
- package/.codex/skills/team-lifecycle/phases/04-pipeline-coordination.md +719 -0
- package/.codex/skills/team-lifecycle/phases/05-completion-report.md +288 -0
- package/.codex/skills/team-lifecycle/specs/document-standards.md +192 -0
- package/.codex/skills/team-lifecycle/specs/quality-gates.md +207 -0
- package/.codex/skills/team-lifecycle/templates/architecture-doc.md +254 -0
- package/.codex/skills/team-lifecycle/templates/epics-template.md +196 -0
- package/.codex/skills/team-lifecycle/templates/product-brief.md +133 -0
- package/.codex/skills/team-lifecycle/templates/requirements-prd.md +224 -0
- package/.codex/skills/team-planex/agents/executor.md +217 -0
- package/.codex/skills/team-planex/agents/planner.md +183 -0
- package/.codex/skills/team-planex/orchestrator.md +284 -0
- package/.codex/skills/unified-execute-with-file/SKILL.md +786 -0
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +391 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +452 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +476 -0
- package/README.md +187 -157
- package/ccw/README.md +46 -0
- package/ccw/bin/ccw-mcp.js +16 -1
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +58 -2
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/cli.d.ts +3 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +109 -63
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/commands/core-memory.d.ts +5 -0
- package/ccw/dist/commands/core-memory.d.ts.map +1 -1
- package/ccw/dist/commands/core-memory.js +307 -2
- package/ccw/dist/commands/core-memory.js.map +1 -1
- package/ccw/dist/commands/hook.d.ts +3 -1
- package/ccw/dist/commands/hook.d.ts.map +1 -1
- package/ccw/dist/commands/hook.js +669 -85
- package/ccw/dist/commands/hook.js.map +1 -1
- package/ccw/dist/commands/install.d.ts +12 -0
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +313 -3
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +18 -5
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +58 -19
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/commands/memory.d.ts +1 -1
- package/ccw/dist/commands/memory.d.ts.map +1 -1
- package/ccw/dist/commands/memory.js +371 -1
- package/ccw/dist/commands/memory.js.map +1 -1
- package/ccw/dist/commands/serve.d.ts.map +1 -1
- package/ccw/dist/commands/serve.js +74 -4
- package/ccw/dist/commands/serve.js.map +1 -1
- package/ccw/dist/commands/spec.d.ts +24 -0
- package/ccw/dist/commands/spec.d.ts.map +1 -0
- package/ccw/dist/commands/spec.js +374 -0
- package/ccw/dist/commands/spec.js.map +1 -0
- package/ccw/dist/commands/stop.d.ts +0 -4
- package/ccw/dist/commands/stop.d.ts.map +1 -1
- package/ccw/dist/commands/stop.js +135 -12
- package/ccw/dist/commands/stop.js.map +1 -1
- package/ccw/dist/commands/team.d.ts +27 -0
- package/ccw/dist/commands/team.d.ts.map +1 -0
- package/ccw/dist/commands/team.js +164 -0
- package/ccw/dist/commands/team.js.map +1 -0
- package/ccw/dist/commands/upgrade.js +4 -2
- package/ccw/dist/commands/upgrade.js.map +1 -1
- package/ccw/dist/commands/view.d.ts.map +1 -1
- package/ccw/dist/commands/view.js +2 -3
- package/ccw/dist/commands/view.js.map +1 -1
- package/ccw/dist/commands/workflow.js +2 -2
- package/ccw/dist/commands/workflow.js.map +1 -1
- package/ccw/dist/config/cli-settings-manager.d.ts +12 -3
- package/ccw/dist/config/cli-settings-manager.d.ts.map +1 -1
- package/ccw/dist/config/cli-settings-manager.js +146 -12
- package/ccw/dist/config/cli-settings-manager.js.map +1 -1
- package/ccw/dist/config/litellm-static-models.d.ts +30 -0
- package/ccw/dist/config/litellm-static-models.d.ts.map +1 -0
- package/ccw/dist/config/litellm-static-models.js +82 -0
- package/ccw/dist/config/litellm-static-models.js.map +1 -0
- package/ccw/dist/config/provider-models.d.ts +5 -32
- package/ccw/dist/config/provider-models.d.ts.map +1 -1
- package/ccw/dist/config/provider-models.js +5 -103
- package/ccw/dist/config/provider-models.js.map +1 -1
- package/ccw/dist/config/remote-notification-config.d.ts +32 -0
- package/ccw/dist/config/remote-notification-config.d.ts.map +1 -0
- package/ccw/dist/config/remote-notification-config.js +131 -0
- package/ccw/dist/config/remote-notification-config.js.map +1 -0
- package/ccw/dist/config/storage-paths.d.ts +22 -0
- package/ccw/dist/config/storage-paths.d.ts.map +1 -1
- package/ccw/dist/config/storage-paths.js +27 -0
- package/ccw/dist/config/storage-paths.js.map +1 -1
- package/ccw/dist/core/a2ui/A2UITypes.d.ts +143 -0
- package/ccw/dist/core/a2ui/A2UITypes.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/A2UITypes.js +84 -0
- package/ccw/dist/core/a2ui/A2UITypes.js.map +1 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.d.ts +170 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.js +718 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.js.map +1 -0
- package/ccw/dist/core/a2ui/index.d.ts +3 -0
- package/ccw/dist/core/a2ui/index.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/index.js +6 -0
- package/ccw/dist/core/a2ui/index.js.map +1 -0
- package/ccw/dist/core/auth/csrf-middleware.d.ts.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +26 -8
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/auth/middleware.d.ts.map +1 -1
- package/ccw/dist/core/auth/middleware.js +55 -0
- package/ccw/dist/core/auth/middleware.js.map +1 -1
- package/ccw/dist/core/core-memory-store.d.ts +99 -5
- package/ccw/dist/core/core-memory-store.d.ts.map +1 -1
- package/ccw/dist/core/core-memory-store.js +389 -56
- package/ccw/dist/core/core-memory-store.js.map +1 -1
- package/ccw/dist/core/data-aggregator.d.ts +6 -0
- package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
- package/ccw/dist/core/data-aggregator.js +6 -35
- package/ccw/dist/core/data-aggregator.js.map +1 -1
- package/ccw/dist/core/hooks/context-limit-detector.d.ts +65 -0
- package/ccw/dist/core/hooks/context-limit-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/context-limit-detector.js +91 -0
- package/ccw/dist/core/hooks/context-limit-detector.js.map +1 -0
- package/ccw/dist/core/hooks/index.d.ts +11 -0
- package/ccw/dist/core/hooks/index.d.ts.map +1 -0
- package/ccw/dist/core/hooks/index.js +16 -0
- package/ccw/dist/core/hooks/index.js.map +1 -0
- package/ccw/dist/core/hooks/keyword-detector.d.ts +106 -0
- package/ccw/dist/core/hooks/keyword-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/keyword-detector.js +194 -0
- package/ccw/dist/core/hooks/keyword-detector.js.map +1 -0
- package/ccw/dist/core/hooks/recovery-handler.d.ts +114 -0
- package/ccw/dist/core/hooks/recovery-handler.d.ts.map +1 -0
- package/ccw/dist/core/hooks/recovery-handler.js +244 -0
- package/ccw/dist/core/hooks/recovery-handler.js.map +1 -0
- package/ccw/dist/core/hooks/stop-handler.d.ts +128 -0
- package/ccw/dist/core/hooks/stop-handler.d.ts.map +1 -0
- package/ccw/dist/core/hooks/stop-handler.js +269 -0
- package/ccw/dist/core/hooks/stop-handler.js.map +1 -0
- package/ccw/dist/core/hooks/user-abort-detector.d.ts +76 -0
- package/ccw/dist/core/hooks/user-abort-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/user-abort-detector.js +168 -0
- package/ccw/dist/core/hooks/user-abort-detector.js.map +1 -0
- package/ccw/dist/core/lite-scanner-complete.d.ts +18 -3
- package/ccw/dist/core/lite-scanner-complete.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner-complete.js +54 -12
- package/ccw/dist/core/lite-scanner-complete.js.map +1 -1
- package/ccw/dist/core/lite-scanner.d.ts +74 -3
- package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner.js +57 -12
- package/ccw/dist/core/lite-scanner.js.map +1 -1
- package/ccw/dist/core/memory-consolidation-pipeline.d.ts +126 -0
- package/ccw/dist/core/memory-consolidation-pipeline.d.ts.map +1 -0
- package/ccw/dist/core/memory-consolidation-pipeline.js +364 -0
- package/ccw/dist/core/memory-consolidation-pipeline.js.map +1 -0
- package/ccw/dist/core/memory-consolidation-prompts.d.ts +27 -0
- package/ccw/dist/core/memory-consolidation-prompts.d.ts.map +1 -0
- package/ccw/dist/core/memory-consolidation-prompts.js +103 -0
- package/ccw/dist/core/memory-consolidation-prompts.js.map +1 -0
- package/ccw/dist/core/memory-embedder-bridge.d.ts +22 -0
- package/ccw/dist/core/memory-embedder-bridge.d.ts.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.js +85 -0
- package/ccw/dist/core/memory-embedder-bridge.js.map +1 -1
- package/ccw/dist/core/memory-extraction-pipeline.d.ts +244 -0
- package/ccw/dist/core/memory-extraction-pipeline.d.ts.map +1 -0
- package/ccw/dist/core/memory-extraction-pipeline.js +934 -0
- package/ccw/dist/core/memory-extraction-pipeline.js.map +1 -0
- package/ccw/dist/core/memory-extraction-prompts.d.ts +29 -0
- package/ccw/dist/core/memory-extraction-prompts.d.ts.map +1 -0
- package/ccw/dist/core/memory-extraction-prompts.js +99 -0
- package/ccw/dist/core/memory-extraction-prompts.js.map +1 -0
- package/ccw/dist/core/memory-job-scheduler.d.ts +92 -0
- package/ccw/dist/core/memory-job-scheduler.d.ts.map +1 -0
- package/ccw/dist/core/memory-job-scheduler.js +264 -0
- package/ccw/dist/core/memory-job-scheduler.js.map +1 -0
- package/ccw/dist/core/memory-v2-config.d.ts +48 -0
- package/ccw/dist/core/memory-v2-config.d.ts.map +1 -0
- package/ccw/dist/core/memory-v2-config.js +51 -0
- package/ccw/dist/core/memory-v2-config.js.map +1 -0
- package/ccw/dist/core/mode-workflow-map.d.ts +148 -0
- package/ccw/dist/core/mode-workflow-map.d.ts.map +1 -0
- package/ccw/dist/core/mode-workflow-map.js +271 -0
- package/ccw/dist/core/mode-workflow-map.js.map +1 -0
- package/ccw/dist/core/pattern-detector.d.ts +99 -0
- package/ccw/dist/core/pattern-detector.d.ts.map +1 -0
- package/ccw/dist/core/pattern-detector.js +385 -0
- package/ccw/dist/core/pattern-detector.js.map +1 -0
- package/ccw/dist/core/routes/analysis-routes.d.ts +40 -0
- package/ccw/dist/core/routes/analysis-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/analysis-routes.js +172 -0
- package/ccw/dist/core/routes/analysis-routes.js.map +1 -0
- package/ccw/dist/core/routes/audit-routes.d.ts +14 -0
- package/ccw/dist/core/routes/audit-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/audit-routes.js +150 -0
- package/ccw/dist/core/routes/audit-routes.js.map +1 -0
- package/ccw/dist/core/routes/ccw-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/ccw-routes.js +87 -0
- package/ccw/dist/core/routes/ccw-routes.js.map +1 -1
- package/ccw/dist/core/routes/claude-routes.js +13 -13
- package/ccw/dist/core/routes/claude-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts +6 -2
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js +308 -22
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-sessions-routes.d.ts +20 -0
- package/ccw/dist/core/routes/cli-sessions-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/cli-sessions-routes.js +449 -0
- package/ccw/dist/core/routes/cli-sessions-routes.js.map +1 -0
- package/ccw/dist/core/routes/cli-settings-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-settings-routes.js +217 -3
- package/ccw/dist/core/routes/cli-settings-routes.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +164 -26
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.js +98 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js +308 -0
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js.map +1 -1
- package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/commands-routes.js +399 -1
- package/ccw/dist/core/routes/commands-routes.js.map +1 -1
- package/ccw/dist/core/routes/config-routes.d.ts +22 -0
- package/ccw/dist/core/routes/config-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/config-routes.js +291 -0
- package/ccw/dist/core/routes/config-routes.js.map +1 -0
- package/ccw/dist/core/routes/core-memory-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/core-memory-routes.js +461 -5
- package/ccw/dist/core/routes/core-memory-routes.js.map +1 -1
- package/ccw/dist/core/routes/dashboard-routes.d.ts +15 -0
- package/ccw/dist/core/routes/dashboard-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/dashboard-routes.js +121 -0
- package/ccw/dist/core/routes/dashboard-routes.js.map +1 -0
- package/ccw/dist/core/routes/files-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/files-routes.js +296 -8
- package/ccw/dist/core/routes/files-routes.js.map +1 -1
- package/ccw/dist/core/routes/hooks-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/hooks-routes.js +274 -67
- package/ccw/dist/core/routes/hooks-routes.js.map +1 -1
- package/ccw/dist/core/routes/issue-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/issue-routes.js +399 -27
- package/ccw/dist/core/routes/issue-routes.js.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.js +74 -135
- package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
- package/ccw/dist/core/routes/mcp-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/mcp-routes.js +79 -15
- package/ccw/dist/core/routes/mcp-routes.js.map +1 -1
- package/ccw/dist/core/routes/mcp-templates-db.d.ts.map +1 -1
- package/ccw/dist/core/routes/mcp-templates-db.js +20 -7
- package/ccw/dist/core/routes/mcp-templates-db.js.map +1 -1
- package/ccw/dist/core/routes/memory-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/memory-routes.js +137 -0
- package/ccw/dist/core/routes/memory-routes.js.map +1 -1
- package/ccw/dist/core/routes/notification-routes.d.ts +10 -0
- package/ccw/dist/core/routes/notification-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/notification-routes.js +507 -0
- package/ccw/dist/core/routes/notification-routes.js.map +1 -0
- package/ccw/dist/core/routes/orchestrator-routes.d.ts +282 -0
- package/ccw/dist/core/routes/orchestrator-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/orchestrator-routes.js +1564 -0
- package/ccw/dist/core/routes/orchestrator-routes.js.map +1 -0
- package/ccw/dist/core/routes/provider-routes.d.ts +4 -0
- package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/provider-routes.js +45 -11
- package/ccw/dist/core/routes/provider-routes.js.map +1 -1
- package/ccw/dist/core/routes/queue-routes.d.ts +22 -0
- package/ccw/dist/core/routes/queue-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/queue-routes.js +164 -0
- package/ccw/dist/core/routes/queue-routes.js.map +1 -0
- package/ccw/dist/core/routes/skill-hub-routes.d.ts +77 -0
- package/ccw/dist/core/routes/skill-hub-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/skill-hub-routes.js +988 -0
- package/ccw/dist/core/routes/skill-hub-routes.js.map +1 -0
- package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/skills-routes.js +105 -62
- package/ccw/dist/core/routes/skills-routes.js.map +1 -1
- package/ccw/dist/core/routes/spec-routes.d.ts +7 -0
- package/ccw/dist/core/routes/spec-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/spec-routes.js +266 -0
- package/ccw/dist/core/routes/spec-routes.js.map +1 -0
- package/ccw/dist/core/routes/status-routes.js +4 -4
- package/ccw/dist/core/routes/status-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +537 -6
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/routes/team-routes.d.ts +27 -0
- package/ccw/dist/core/routes/team-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/team-routes.js +557 -0
- package/ccw/dist/core/routes/team-routes.js.map +1 -0
- package/ccw/dist/core/routes/unified-memory-routes.d.ts +16 -0
- package/ccw/dist/core/routes/unified-memory-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/unified-memory-routes.js +135 -0
- package/ccw/dist/core/routes/unified-memory-routes.js.map +1 -0
- package/ccw/dist/core/routes/unsplash-routes.d.ts +4 -0
- package/ccw/dist/core/routes/unsplash-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/unsplash-routes.js +197 -0
- package/ccw/dist/core/routes/unsplash-routes.js.map +1 -0
- package/ccw/dist/core/schemas/issue-schema.d.ts +115 -0
- package/ccw/dist/core/schemas/issue-schema.d.ts.map +1 -0
- package/ccw/dist/core/schemas/issue-schema.js +117 -0
- package/ccw/dist/core/schemas/issue-schema.js.map +1 -0
- package/ccw/dist/core/server.d.ts +1 -0
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +223 -218
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/core/services/checkpoint-service.d.ts +215 -0
- package/ccw/dist/core/services/checkpoint-service.d.ts.map +1 -0
- package/ccw/dist/core/services/checkpoint-service.js +376 -0
- package/ccw/dist/core/services/checkpoint-service.js.map +1 -0
- package/ccw/dist/core/services/cli-instruction-assembler.d.ts +10 -0
- package/ccw/dist/core/services/cli-instruction-assembler.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-instruction-assembler.js +28 -0
- package/ccw/dist/core/services/cli-instruction-assembler.js.map +1 -0
- package/ccw/dist/core/services/cli-launch-registry.d.ts +9 -0
- package/ccw/dist/core/services/cli-launch-registry.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-launch-registry.js +40 -0
- package/ccw/dist/core/services/cli-launch-registry.js.map +1 -0
- package/ccw/dist/core/services/cli-session-audit.d.ts +15 -0
- package/ccw/dist/core/services/cli-session-audit.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-audit.js +18 -0
- package/ccw/dist/core/services/cli-session-audit.js.map +1 -0
- package/ccw/dist/core/services/cli-session-command-builder.d.ts +20 -0
- package/ccw/dist/core/services/cli-session-command-builder.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-command-builder.js +66 -0
- package/ccw/dist/core/services/cli-session-command-builder.js.map +1 -0
- package/ccw/dist/core/services/cli-session-manager.d.ts +84 -0
- package/ccw/dist/core/services/cli-session-manager.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-manager.js +538 -0
- package/ccw/dist/core/services/cli-session-manager.js.map +1 -0
- package/ccw/dist/core/services/cli-session-mux.d.ts +18 -0
- package/ccw/dist/core/services/cli-session-mux.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-mux.js +18 -0
- package/ccw/dist/core/services/cli-session-mux.js.map +1 -0
- package/ccw/dist/core/services/cli-session-policy.d.ts +15 -0
- package/ccw/dist/core/services/cli-session-policy.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-policy.js +40 -0
- package/ccw/dist/core/services/cli-session-policy.js.map +1 -0
- package/ccw/dist/core/services/cli-session-share.d.ts +27 -0
- package/ccw/dist/core/services/cli-session-share.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-share.js +85 -0
- package/ccw/dist/core/services/cli-session-share.js.map +1 -0
- package/ccw/dist/core/services/config-backup.d.ts +69 -0
- package/ccw/dist/core/services/config-backup.d.ts.map +1 -0
- package/ccw/dist/core/services/config-backup.js +171 -0
- package/ccw/dist/core/services/config-backup.js.map +1 -0
- package/ccw/dist/core/services/config-sync.d.ts +73 -0
- package/ccw/dist/core/services/config-sync.d.ts.map +1 -0
- package/ccw/dist/core/services/config-sync.js +235 -0
- package/ccw/dist/core/services/config-sync.js.map +1 -0
- package/ccw/dist/core/services/flow-executor.d.ts +204 -0
- package/ccw/dist/core/services/flow-executor.d.ts.map +1 -0
- package/ccw/dist/core/services/flow-executor.js +775 -0
- package/ccw/dist/core/services/flow-executor.js.map +1 -0
- package/ccw/dist/core/services/hook-context-service.d.ts +139 -0
- package/ccw/dist/core/services/hook-context-service.d.ts.map +1 -0
- package/ccw/dist/core/services/hook-context-service.js +248 -0
- package/ccw/dist/core/services/hook-context-service.js.map +1 -0
- package/ccw/dist/core/services/index.d.ts +22 -0
- package/ccw/dist/core/services/index.d.ts.map +1 -0
- package/ccw/dist/core/services/index.js +22 -0
- package/ccw/dist/core/services/index.js.map +1 -0
- package/ccw/dist/core/services/issue-service.d.ts +54 -0
- package/ccw/dist/core/services/issue-service.d.ts.map +1 -0
- package/ccw/dist/core/services/issue-service.js +107 -0
- package/ccw/dist/core/services/issue-service.js.map +1 -0
- package/ccw/dist/core/services/mode-registry-service.d.ts +254 -0
- package/ccw/dist/core/services/mode-registry-service.d.ts.map +1 -0
- package/ccw/dist/core/services/mode-registry-service.js +587 -0
- package/ccw/dist/core/services/mode-registry-service.js.map +1 -0
- package/ccw/dist/core/services/pending-question-service.d.ts +51 -0
- package/ccw/dist/core/services/pending-question-service.d.ts.map +1 -0
- package/ccw/dist/core/services/pending-question-service.js +201 -0
- package/ccw/dist/core/services/pending-question-service.js.map +1 -0
- package/ccw/dist/core/services/queue-scheduler-service.d.ts +136 -0
- package/ccw/dist/core/services/queue-scheduler-service.d.ts.map +1 -0
- package/ccw/dist/core/services/queue-scheduler-service.js +587 -0
- package/ccw/dist/core/services/queue-scheduler-service.js.map +1 -0
- package/ccw/dist/core/services/rate-limiter.d.ts +20 -0
- package/ccw/dist/core/services/rate-limiter.d.ts.map +1 -0
- package/ccw/dist/core/services/rate-limiter.js +33 -0
- package/ccw/dist/core/services/rate-limiter.js.map +1 -0
- package/ccw/dist/core/services/remote-notification-service.d.ts +132 -0
- package/ccw/dist/core/services/remote-notification-service.d.ts.map +1 -0
- package/ccw/dist/core/services/remote-notification-service.js +953 -0
- package/ccw/dist/core/services/remote-notification-service.js.map +1 -0
- package/ccw/dist/core/services/session-end-service.d.ts +155 -0
- package/ccw/dist/core/services/session-end-service.d.ts.map +1 -0
- package/ccw/dist/core/services/session-end-service.js +302 -0
- package/ccw/dist/core/services/session-end-service.js.map +1 -0
- package/ccw/dist/core/services/session-state-service.d.ts +148 -0
- package/ccw/dist/core/services/session-state-service.d.ts.map +1 -0
- package/ccw/dist/core/services/session-state-service.js +259 -0
- package/ccw/dist/core/services/session-state-service.js.map +1 -0
- package/ccw/dist/core/services/version-checker.d.ts +50 -0
- package/ccw/dist/core/services/version-checker.d.ts.map +1 -0
- package/ccw/dist/core/services/version-checker.js +141 -0
- package/ccw/dist/core/services/version-checker.js.map +1 -0
- package/ccw/dist/core/session-clustering-service.d.ts +43 -2
- package/ccw/dist/core/session-clustering-service.d.ts.map +1 -1
- package/ccw/dist/core/session-clustering-service.js +210 -6
- package/ccw/dist/core/session-clustering-service.js.map +1 -1
- package/ccw/dist/core/types/issue.d.ts +103 -0
- package/ccw/dist/core/types/issue.d.ts.map +1 -0
- package/ccw/dist/core/types/issue.js +6 -0
- package/ccw/dist/core/types/issue.js.map +1 -0
- package/ccw/dist/core/unified-context-builder.d.ts +88 -0
- package/ccw/dist/core/unified-context-builder.d.ts.map +1 -0
- package/ccw/dist/core/unified-context-builder.js +379 -0
- package/ccw/dist/core/unified-context-builder.js.map +1 -0
- package/ccw/dist/core/unified-memory-service.d.ts +142 -0
- package/ccw/dist/core/unified-memory-service.d.ts.map +1 -0
- package/ccw/dist/core/unified-memory-service.js +348 -0
- package/ccw/dist/core/unified-memory-service.js.map +1 -0
- package/ccw/dist/core/unified-vector-index.d.ts +171 -0
- package/ccw/dist/core/unified-vector-index.d.ts.map +1 -0
- package/ccw/dist/core/unified-vector-index.js +332 -0
- package/ccw/dist/core/unified-vector-index.js.map +1 -0
- package/ccw/dist/core/websocket.d.ts +195 -0
- package/ccw/dist/core/websocket.d.ts.map +1 -1
- package/ccw/dist/core/websocket.js +156 -25
- package/ccw/dist/core/websocket.js.map +1 -1
- package/ccw/dist/index.d.ts +0 -1
- package/ccw/dist/index.d.ts.map +1 -1
- package/ccw/dist/index.js +0 -1
- package/ccw/dist/index.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +16 -8
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/ask-question.d.ts +43 -0
- package/ccw/dist/tools/ask-question.d.ts.map +1 -0
- package/ccw/dist/tools/ask-question.js +1061 -0
- package/ccw/dist/tools/ask-question.js.map +1 -0
- package/ccw/dist/tools/claude-cli-tools.d.ts +18 -4
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +44 -37
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/claude-session-parser.d.ts +116 -0
- package/ccw/dist/tools/claude-session-parser.d.ts.map +1 -0
- package/ccw/dist/tools/claude-session-parser.js +364 -0
- package/ccw/dist/tools/claude-session-parser.js.map +1 -0
- package/ccw/dist/tools/cli-config-manager.d.ts +3 -0
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +4 -1
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts +24 -0
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +103 -8
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-state.js +4 -4
- package/ccw/dist/tools/cli-executor-state.js.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.d.ts +2 -0
- package/ccw/dist/tools/cli-executor-utils.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.js +14 -5
- package/ccw/dist/tools/cli-executor-utils.js.map +1 -1
- package/ccw/dist/tools/cli-history-store.d.ts +11 -6
- package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.js +134 -17
- package/ccw/dist/tools/cli-history-store.js.map +1 -1
- package/ccw/dist/tools/cli-output-converter.d.ts +7 -0
- package/ccw/dist/tools/cli-output-converter.d.ts.map +1 -1
- package/ccw/dist/tools/cli-output-converter.js +166 -16
- package/ccw/dist/tools/cli-output-converter.js.map +1 -1
- package/ccw/dist/tools/codex-lens.d.ts +13 -0
- package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens.js +200 -185
- package/ccw/dist/tools/codex-lens.js.map +1 -1
- package/ccw/dist/tools/command-registry.test.js +727 -0
- package/ccw/dist/tools/core-memory.d.ts +35 -1
- package/ccw/dist/tools/core-memory.d.ts.map +1 -1
- package/ccw/dist/tools/core-memory.js +195 -5
- package/ccw/dist/tools/core-memory.js.map +1 -1
- package/ccw/dist/tools/edit-file.d.ts.map +1 -1
- package/ccw/dist/tools/edit-file.js +69 -31
- package/ccw/dist/tools/edit-file.js.map +1 -1
- package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
- package/ccw/dist/tools/generate-module-docs.js +9 -14
- package/ccw/dist/tools/generate-module-docs.js.map +1 -1
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +8 -2
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/native-session-discovery.d.ts +19 -2
- package/ccw/dist/tools/native-session-discovery.d.ts.map +1 -1
- package/ccw/dist/tools/native-session-discovery.js +191 -20
- package/ccw/dist/tools/native-session-discovery.js.map +1 -1
- package/ccw/dist/tools/opencode-session-parser.d.ts +120 -0
- package/ccw/dist/tools/opencode-session-parser.d.ts.map +1 -0
- package/ccw/dist/tools/opencode-session-parser.js +330 -0
- package/ccw/dist/tools/opencode-session-parser.js.map +1 -0
- package/ccw/dist/tools/read-file.d.ts +5 -24
- package/ccw/dist/tools/read-file.d.ts.map +1 -1
- package/ccw/dist/tools/read-file.js +44 -282
- package/ccw/dist/tools/read-file.js.map +1 -1
- package/ccw/dist/tools/read-many-files.d.ts +15 -0
- package/ccw/dist/tools/read-many-files.d.ts.map +1 -0
- package/ccw/dist/tools/read-many-files.js +166 -0
- package/ccw/dist/tools/read-many-files.js.map +1 -0
- package/ccw/dist/tools/read-outline.d.ts +13 -0
- package/ccw/dist/tools/read-outline.d.ts.map +1 -0
- package/ccw/dist/tools/read-outline.js +86 -0
- package/ccw/dist/tools/read-outline.js.map +1 -0
- package/ccw/dist/tools/resume-strategy.d.ts.map +1 -1
- package/ccw/dist/tools/resume-strategy.js +16 -0
- package/ccw/dist/tools/resume-strategy.js.map +1 -1
- package/ccw/dist/tools/session-content-parser.d.ts +3 -3
- package/ccw/dist/tools/session-content-parser.d.ts.map +1 -1
- package/ccw/dist/tools/session-content-parser.js +40 -10
- package/ccw/dist/tools/session-content-parser.js.map +1 -1
- package/ccw/dist/tools/spec-index-builder.d.ts +140 -0
- package/ccw/dist/tools/spec-index-builder.d.ts.map +1 -0
- package/ccw/dist/tools/spec-index-builder.js +340 -0
- package/ccw/dist/tools/spec-index-builder.js.map +1 -0
- package/ccw/dist/tools/spec-init.d.ts +46 -0
- package/ccw/dist/tools/spec-init.d.ts.map +1 -0
- package/ccw/dist/tools/spec-init.js +226 -0
- package/ccw/dist/tools/spec-init.js.map +1 -0
- package/ccw/dist/tools/spec-keyword-extractor.d.ts +52 -0
- package/ccw/dist/tools/spec-keyword-extractor.d.ts.map +1 -0
- package/ccw/dist/tools/spec-keyword-extractor.js +183 -0
- package/ccw/dist/tools/spec-keyword-extractor.js.map +1 -0
- package/ccw/dist/tools/spec-loader.d.ts +119 -0
- package/ccw/dist/tools/spec-loader.d.ts.map +1 -0
- package/ccw/dist/tools/spec-loader.js +326 -0
- package/ccw/dist/tools/spec-loader.js.map +1 -0
- package/ccw/dist/tools/team-msg.d.ts +61 -0
- package/ccw/dist/tools/team-msg.d.ts.map +1 -0
- package/ccw/dist/tools/team-msg.js +331 -0
- package/ccw/dist/tools/team-msg.js.map +1 -0
- package/ccw/dist/tools/template-discovery.d.ts +1 -1
- package/ccw/dist/tools/template-discovery.js +2 -2
- package/ccw/dist/tools/template-discovery.js.map +1 -1
- package/ccw/dist/tools/ui-generate-preview.js +7 -7
- package/ccw/dist/tools/ui-generate-preview.js.map +1 -1
- package/ccw/dist/tools/update-module-claude.d.ts.map +1 -1
- package/ccw/dist/tools/update-module-claude.js +18 -32
- package/ccw/dist/tools/update-module-claude.js.map +1 -1
- package/ccw/dist/types/cli-settings.d.ts +139 -9
- package/ccw/dist/types/cli-settings.d.ts.map +1 -1
- package/ccw/dist/types/cli-settings.js +67 -13
- package/ccw/dist/types/cli-settings.js.map +1 -1
- package/ccw/dist/types/queue-types.d.ts +156 -0
- package/ccw/dist/types/queue-types.d.ts.map +1 -0
- package/ccw/dist/types/queue-types.js +6 -0
- package/ccw/dist/types/queue-types.js.map +1 -0
- package/ccw/dist/types/remote-notification.d.ts +209 -0
- package/ccw/dist/types/remote-notification.d.ts.map +1 -0
- package/ccw/dist/types/remote-notification.js +86 -0
- package/ccw/dist/types/remote-notification.js.map +1 -0
- package/ccw/dist/types/util.d.ts +28 -0
- package/ccw/dist/types/util.d.ts.map +1 -0
- package/ccw/dist/types/util.js +35 -0
- package/ccw/dist/types/util.js.map +1 -0
- package/ccw/dist/utils/dashboard-launcher.d.ts +36 -0
- package/ccw/dist/utils/dashboard-launcher.d.ts.map +1 -0
- package/ccw/dist/utils/dashboard-launcher.js +166 -0
- package/ccw/dist/utils/dashboard-launcher.js.map +1 -0
- package/ccw/dist/utils/db-loader.d.ts +15 -0
- package/ccw/dist/utils/db-loader.d.ts.map +1 -0
- package/ccw/dist/utils/db-loader.js +51 -0
- package/ccw/dist/utils/db-loader.js.map +1 -0
- package/ccw/dist/utils/file-reader.d.ts +73 -0
- package/ccw/dist/utils/file-reader.d.ts.map +1 -0
- package/ccw/dist/utils/file-reader.js +201 -0
- package/ccw/dist/utils/file-reader.js.map +1 -0
- package/ccw/dist/utils/outline-parser.d.ts +28 -0
- package/ccw/dist/utils/outline-parser.d.ts.map +1 -0
- package/ccw/dist/utils/outline-parser.js +273 -0
- package/ccw/dist/utils/outline-parser.js.map +1 -0
- package/ccw/dist/utils/outline-queries.d.ts +15 -0
- package/ccw/dist/utils/outline-queries.d.ts.map +1 -0
- package/ccw/dist/utils/outline-queries.js +141 -0
- package/ccw/dist/utils/outline-queries.js.map +1 -0
- package/ccw/dist/utils/package-discovery.d.ts +69 -0
- package/ccw/dist/utils/package-discovery.d.ts.map +1 -0
- package/ccw/dist/utils/package-discovery.js +258 -0
- package/ccw/dist/utils/package-discovery.js.map +1 -0
- package/ccw/dist/utils/path-validator.d.ts +3 -3
- package/ccw/dist/utils/path-validator.d.ts.map +1 -1
- package/ccw/dist/utils/path-validator.js +12 -12
- package/ccw/dist/utils/path-validator.js.map +1 -1
- package/ccw/dist/utils/react-frontend.d.ts +19 -0
- package/ccw/dist/utils/react-frontend.d.ts.map +1 -0
- package/ccw/dist/utils/react-frontend.js +203 -0
- package/ccw/dist/utils/react-frontend.js.map +1 -0
- package/ccw/dist/utils/secret-redactor.d.ts +23 -0
- package/ccw/dist/utils/secret-redactor.d.ts.map +1 -0
- package/ccw/dist/utils/secret-redactor.js +48 -0
- package/ccw/dist/utils/secret-redactor.js.map +1 -0
- package/ccw/dist/utils/security-validation.d.ts +48 -0
- package/ccw/dist/utils/security-validation.d.ts.map +1 -0
- package/ccw/dist/utils/security-validation.js +117 -0
- package/ccw/dist/utils/security-validation.js.map +1 -0
- package/ccw/dist/utils/uv-manager.d.ts +3 -2
- package/ccw/dist/utils/uv-manager.d.ts.map +1 -1
- package/ccw/dist/utils/uv-manager.js +7 -4
- package/ccw/dist/utils/uv-manager.js.map +1 -1
- package/ccw/scripts/prepublish-clean.mjs +32 -0
- package/ccw/scripts/unified_memory_embedder.py +473 -0
- package/codex-lens/pyproject.toml +37 -46
- package/codex-lens/src/codexlens/api/__init__.py +5 -0
- package/codex-lens/src/codexlens/api/lsp_lifecycle.py +124 -0
- package/codex-lens/src/codexlens/api/semantic.py +33 -22
- package/codex-lens/src/codexlens/cli/commands.py +392 -552
- package/codex-lens/src/codexlens/cli/embedding_manager.py +558 -367
- package/codex-lens/src/codexlens/config.py +525 -129
- package/codex-lens/src/codexlens/env_config.py +21 -1
- package/codex-lens/src/codexlens/lsp/keepalive_bridge.py +135 -0
- package/codex-lens/src/codexlens/lsp/lsp_bridge.py +33 -10
- package/codex-lens/src/codexlens/lsp/lsp_graph_builder.py +12 -4
- package/codex-lens/src/codexlens/lsp/standalone_manager.py +114 -21
- package/codex-lens/src/codexlens/parsers/__init__.py +8 -2
- package/codex-lens/src/codexlens/parsers/astgrep_binding.py +320 -0
- package/codex-lens/src/codexlens/parsers/astgrep_js_ts_processor.py +306 -0
- package/codex-lens/src/codexlens/parsers/astgrep_processor.py +1033 -0
- package/codex-lens/src/codexlens/parsers/factory.py +10 -2
- package/codex-lens/src/codexlens/parsers/patterns/__init__.py +5 -0
- package/codex-lens/src/codexlens/parsers/patterns/javascript/__init__.py +92 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/__init__.py +204 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/call.yaml +87 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/imports.yaml +82 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/inherits.yaml +42 -0
- package/codex-lens/src/codexlens/parsers/patterns/typescript/__init__.py +73 -0
- package/codex-lens/src/codexlens/parsers/treesitter_parser.py +135 -9
- package/codex-lens/src/codexlens/search/__init__.py +2 -0
- package/codex-lens/src/codexlens/search/binary_searcher.py +67 -35
- package/codex-lens/src/codexlens/search/chain_search.py +825 -251
- package/codex-lens/src/codexlens/search/clustering/hdbscan_strategy.py +24 -2
- package/codex-lens/src/codexlens/search/global_graph_expander.py +250 -0
- package/codex-lens/src/codexlens/search/hybrid_search.py +11 -203
- package/codex-lens/src/codexlens/search/ranking.py +8 -35
- package/codex-lens/src/codexlens/semantic/reranker/api_reranker.py +41 -2
- package/codex-lens/src/codexlens/storage/global_index.py +225 -5
- package/codex-lens/src/codexlens/storage/index_tree.py +46 -0
- package/codex-lens/src/codexlens/storage/path_mapper.py +8 -8
- package/codex-lens/src/codexlens/watcher/incremental_indexer.py +55 -1
- package/package.json +22 -12
- package/.claude/CLAUDE.md +0 -44
- package/.claude/commands/ccw-debug.md +0 -832
- package/.claude/commands/codex-coordinator.md +0 -513
- package/.claude/commands/memory/compact.md +0 -383
- package/.claude/commands/memory/docs-full-cli.md +0 -471
- package/.claude/commands/memory/docs-related-cli.md +0 -386
- package/.claude/commands/memory/load.md +0 -240
- package/.claude/commands/memory/tips.md +0 -332
- package/.claude/commands/memory/update-full.md +0 -332
- package/.claude/commands/memory/update-related.md +0 -332
- package/.claude/commands/view.md +0 -367
- package/.claude/commands/workflow/brainstorm/artifacts.md +0 -457
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +0 -433
- package/.claude/commands/workflow/brainstorm/role-analysis.md +0 -705
- package/.claude/commands/workflow/brainstorm/synthesis.md +0 -402
- package/.claude/commands/workflow/execute.md +0 -548
- package/.claude/commands/workflow/lite-execute.md +0 -743
- package/.claude/commands/workflow/lite-fix.md +0 -809
- package/.claude/commands/workflow/lite-lite-lite.md +0 -465
- package/.claude/commands/workflow/lite-plan.md +0 -698
- package/.claude/commands/workflow/multi-cli-plan.md +0 -572
- package/.claude/commands/workflow/plan-verify.md +0 -362
- package/.claude/commands/workflow/plan.md +0 -704
- package/.claude/commands/workflow/replan.md +0 -648
- package/.claude/commands/workflow/review-cycle-fix.md +0 -608
- package/.claude/commands/workflow/review-module-cycle.md +0 -771
- package/.claude/commands/workflow/review-session-cycle.md +0 -782
- package/.claude/commands/workflow/review.md +0 -322
- package/.claude/commands/workflow/tdd-plan.md +0 -630
- package/.claude/commands/workflow/tdd-verify.md +0 -585
- package/.claude/commands/workflow/test-cycle-execute.md +0 -504
- package/.claude/commands/workflow/test-fix-gen.md +0 -699
- package/.claude/commands/workflow/test-gen.md +0 -529
- package/.claude/commands/workflow/tools/conflict-resolution.md +0 -604
- package/.claude/commands/workflow/tools/context-gather.md +0 -404
- package/.claude/commands/workflow/tools/task-generate-agent.md +0 -678
- package/.claude/commands/workflow/tools/task-generate-tdd.md +0 -749
- package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +0 -309
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +0 -164
- package/.claude/commands/workflow/tools/test-context-gather.md +0 -235
- package/.claude/commands/workflow/tools/test-task-generate.md +0 -255
- package/.claude/skills/ccw-loop/SKILL.md +0 -259
- package/.claude/skills/ccw-loop/phases/actions/action-complete.md +0 -320
- package/.claude/skills/ccw-loop/phases/actions/action-debug-with-file.md +0 -485
- package/.claude/skills/ccw-loop/phases/actions/action-develop-with-file.md +0 -365
- package/.claude/skills/ccw-loop/phases/actions/action-init.md +0 -200
- package/.claude/skills/ccw-loop/phases/actions/action-menu.md +0 -192
- package/.claude/skills/ccw-loop/phases/actions/action-validate-with-file.md +0 -307
- package/.claude/skills/ccw-loop/phases/orchestrator.md +0 -486
- package/.claude/skills/ccw-loop/phases/state-schema.md +0 -474
- package/.claude/skills/ccw-loop/specs/action-catalog.md +0 -300
- package/.claude/skills/ccw-loop/specs/loop-requirements.md +0 -192
- package/.claude/skills/ccw-loop/templates/progress-template.md +0 -175
- package/.claude/skills/ccw-loop/templates/understanding-template.md +0 -303
- package/.claude/skills/ccw-loop/templates/validation-template.md +0 -258
- package/.claude/skills/copyright-docs/SKILL.md +0 -132
- package/.claude/skills/copyright-docs/phases/01-metadata-collection.md +0 -78
- package/.claude/skills/copyright-docs/phases/01.5-project-exploration.md +0 -150
- package/.claude/skills/copyright-docs/phases/02-deep-analysis.md +0 -664
- package/.claude/skills/copyright-docs/phases/02.5-consolidation.md +0 -192
- package/.claude/skills/copyright-docs/phases/04-document-assembly.md +0 -261
- package/.claude/skills/copyright-docs/phases/05-compliance-refinement.md +0 -192
- package/.claude/skills/copyright-docs/specs/cpcc-requirements.md +0 -121
- package/.claude/skills/copyright-docs/templates/agent-base.md +0 -200
- package/.claude/skills/flow-coordinator/SKILL.md +0 -394
- package/.claude/skills/flow-coordinator/templates/analyze.json +0 -16
- package/.claude/skills/flow-coordinator/templates/brainstorm-to-issue.json +0 -36
- package/.claude/skills/flow-coordinator/templates/brainstorm.json +0 -16
- package/.claude/skills/flow-coordinator/templates/bugfix-hotfix.json +0 -16
- package/.claude/skills/flow-coordinator/templates/bugfix.json +0 -47
- package/.claude/skills/flow-coordinator/templates/coupled.json +0 -71
- package/.claude/skills/flow-coordinator/templates/debug.json +0 -16
- package/.claude/skills/flow-coordinator/templates/docs.json +0 -27
- package/.claude/skills/flow-coordinator/templates/full.json +0 -61
- package/.claude/skills/flow-coordinator/templates/issue.json +0 -43
- package/.claude/skills/flow-coordinator/templates/lite-lite-lite.json +0 -16
- package/.claude/skills/flow-coordinator/templates/multi-cli-plan.json +0 -47
- package/.claude/skills/flow-coordinator/templates/rapid-to-issue.json +0 -46
- package/.claude/skills/flow-coordinator/templates/rapid.json +0 -47
- package/.claude/skills/flow-coordinator/templates/review.json +0 -43
- package/.claude/skills/flow-coordinator/templates/tdd.json +0 -34
- package/.claude/skills/flow-coordinator/templates/test-fix.json +0 -26
- package/.claude/skills/lite-skill-generator/SKILL.md +0 -650
- package/.claude/skills/lite-skill-generator/templates/simple-skill.md +0 -68
- package/.claude/skills/lite-skill-generator/templates/style-guide.md +0 -64
- package/.claude/skills/project-analyze/SKILL.md +0 -162
- package/.claude/skills/project-analyze/phases/01-requirements-discovery.md +0 -79
- package/.claude/skills/project-analyze/phases/02-project-exploration.md +0 -176
- package/.claude/skills/project-analyze/phases/03-deep-analysis.md +0 -854
- package/.claude/skills/project-analyze/phases/03.5-consolidation.md +0 -233
- package/.claude/skills/project-analyze/phases/04-report-generation.md +0 -217
- package/.claude/skills/project-analyze/phases/05-iterative-refinement.md +0 -124
- package/.claude/skills/project-analyze/specs/quality-standards.md +0 -115
- package/.claude/skills/project-analyze/specs/writing-style.md +0 -152
- package/.claude/skills/prompt-enhancer/SKILL.md +0 -124
- package/.claude/skills/software-manual/SKILL.md +0 -184
- package/.claude/skills/software-manual/phases/01-requirements-discovery.md +0 -162
- package/.claude/skills/software-manual/phases/02-project-exploration.md +0 -101
- package/.claude/skills/software-manual/phases/02.5-api-extraction.md +0 -161
- package/.claude/skills/software-manual/phases/03-parallel-analysis.md +0 -183
- package/.claude/skills/software-manual/phases/03.5-consolidation.md +0 -82
- package/.claude/skills/software-manual/phases/04-screenshot-capture.md +0 -89
- package/.claude/skills/software-manual/phases/05-html-assembly.md +0 -132
- package/.claude/skills/software-manual/phases/06-iterative-refinement.md +0 -259
- package/.claude/skills/software-manual/scripts/api-extractor.md +0 -245
- package/.claude/skills/software-manual/scripts/assemble_docsify.py +0 -584
- package/.claude/skills/software-manual/scripts/bundle-libraries.md +0 -85
- package/.claude/skills/software-manual/scripts/extract_apis.py +0 -270
- package/.claude/skills/software-manual/scripts/screenshot-helper.md +0 -447
- package/.claude/skills/software-manual/scripts/swagger-runner.md +0 -419
- package/.claude/skills/software-manual/scripts/typedoc-runner.md +0 -357
- package/.claude/skills/software-manual/specs/html-template.md +0 -325
- package/.claude/skills/software-manual/specs/quality-standards.md +0 -253
- package/.claude/skills/software-manual/specs/writing-style.md +0 -298
- package/.claude/skills/software-manual/templates/css/docsify-base.css +0 -984
- package/.claude/skills/software-manual/templates/css/wiki-base.css +0 -788
- package/.claude/skills/software-manual/templates/css/wiki-dark.css +0 -278
- package/.claude/skills/software-manual/templates/docsify-shell.html +0 -466
- package/.claude/skills/software-manual/templates/tiddlywiki-shell.html +0 -327
- package/.claude/skills/text-formatter/SKILL.md +0 -196
- package/.claude/skills/text-formatter/phases/01-input-collection.md +0 -111
- package/.claude/skills/text-formatter/phases/02-content-analysis.md +0 -248
- package/.claude/skills/text-formatter/phases/03-format-transform.md +0 -245
- package/.claude/skills/text-formatter/phases/04-output-preview.md +0 -183
- package/.claude/skills/text-formatter/specs/callout-types.md +0 -293
- package/.claude/skills/text-formatter/specs/element-mapping.md +0 -226
- package/.claude/skills/text-formatter/specs/format-rules.md +0 -273
- package/.claude/skills/text-formatter/templates/bbcode-template.md +0 -350
- package/.claude/workflows/_template-compare-matrix.html +0 -692
- package/.claude/workflows/chinese-response.md +0 -25
- package/.claude/workflows/cli-templates/fix-plan-template.json +0 -75
- package/.claude/workflows/cli-templates/fix-progress-template.json +0 -48
- package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +0 -299
- package/.claude/workflows/cli-templates/planning-roles/data-architect.md +0 -120
- package/.claude/workflows/cli-templates/planning-roles/product-manager.md +0 -119
- package/.claude/workflows/cli-templates/planning-roles/product-owner.md +0 -261
- package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +0 -186
- package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +0 -281
- package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +0 -414
- package/.claude/workflows/cli-templates/planning-roles/system-architect.md +0 -106
- package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +0 -124
- package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +0 -379
- package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +0 -240
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-code-patterns.txt +0 -37
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-performance.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-technical-document.txt +0 -33
- package/.claude/workflows/cli-templates/prompts/analysis-assess-security-risks.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-diagnose-bug-root-cause.txt +0 -127
- package/.claude/workflows/cli-templates/prompts/analysis-review-architecture.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-review-code-quality.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/analysis-review-quality-standards.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-trace-code-execution.txt +0 -115
- package/.claude/workflows/cli-templates/prompts/development-debug-runtime-issues.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/development-generate-tests.txt +0 -70
- package/.claude/workflows/cli-templates/prompts/development-implement-component-ui.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/development-implement-feature.txt +0 -58
- package/.claude/workflows/cli-templates/prompts/development-refactor-codebase.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/documentation-api.txt +0 -15
- package/.claude/workflows/cli-templates/prompts/documentation-folder-navigation.txt +0 -27
- package/.claude/workflows/cli-templates/prompts/documentation-module-readme.txt +0 -49
- package/.claude/workflows/cli-templates/prompts/documentation-project-architecture.txt +0 -41
- package/.claude/workflows/cli-templates/prompts/documentation-project-examples.txt +0 -35
- package/.claude/workflows/cli-templates/prompts/documentation-project-readme.txt +0 -35
- package/.claude/workflows/cli-templates/prompts/documentation-swagger-api.txt +0 -266
- package/.claude/workflows/cli-templates/prompts/memory-document-module-structure.txt +0 -165
- package/.claude/workflows/cli-templates/prompts/planning-breakdown-task-steps.txt +0 -30
- package/.claude/workflows/cli-templates/prompts/planning-design-component-spec.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/planning-evaluate-concept-feasibility.txt +0 -127
- package/.claude/workflows/cli-templates/prompts/planning-plan-architecture-design.txt +0 -109
- package/.claude/workflows/cli-templates/prompts/planning-plan-migration-strategy.txt +0 -30
- package/.claude/workflows/cli-templates/prompts/rules-rule-api.txt +0 -122
- package/.claude/workflows/cli-templates/prompts/rules-rule-components.txt +0 -122
- package/.claude/workflows/cli-templates/prompts/rules-rule-config.txt +0 -89
- package/.claude/workflows/cli-templates/prompts/rules-rule-core.txt +0 -60
- package/.claude/workflows/cli-templates/prompts/rules-rule-patterns.txt +0 -70
- package/.claude/workflows/cli-templates/prompts/rules-rule-testing.txt +0 -81
- package/.claude/workflows/cli-templates/prompts/rules-tech-rules-agent-prompt.txt +0 -89
- package/.claude/workflows/cli-templates/prompts/tech-tech-module-format.txt +0 -359
- package/.claude/workflows/cli-templates/prompts/tech-tech-skill-index.txt +0 -185
- package/.claude/workflows/cli-templates/prompts/test-test-concept-analysis.txt +0 -179
- package/.claude/workflows/cli-templates/prompts/universal-universal-creative-style.txt +0 -95
- package/.claude/workflows/cli-templates/prompts/universal-universal-rigorous-style.txt +0 -92
- package/.claude/workflows/cli-templates/prompts/verification-codex-technical.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/verification-cross-validation.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/verification-gemini-strategic.txt +0 -27
- package/.claude/workflows/cli-templates/prompts/workflow-analysis-results-structure.txt +0 -224
- package/.claude/workflows/cli-templates/prompts/workflow-codex-feasibility-validation.txt +0 -176
- package/.claude/workflows/cli-templates/prompts/workflow-gemini-solution-design.txt +0 -131
- package/.claude/workflows/cli-templates/prompts/workflow-impl-plan-template.txt +0 -286
- package/.claude/workflows/cli-templates/prompts/workflow-skill-aggregation.txt +0 -172
- package/.claude/workflows/cli-templates/prompts/workflow-skill-conflict-patterns.txt +0 -94
- package/.claude/workflows/cli-templates/prompts/workflow-skill-index.txt +0 -224
- package/.claude/workflows/cli-templates/prompts/workflow-skill-lessons-learned.txt +0 -94
- package/.claude/workflows/cli-templates/prompts/workflow-skill-sessions-timeline.txt +0 -53
- package/.claude/workflows/cli-templates/prompts/workflow-task-json-agent-mode.txt +0 -123
- package/.claude/workflows/cli-templates/prompts/workflow-task-json-cli-mode.txt +0 -182
- package/.claude/workflows/cli-templates/protocols/analysis-protocol.md +0 -119
- package/.claude/workflows/cli-templates/protocols/write-protocol.md +0 -136
- package/.claude/workflows/cli-templates/schemas/conflict-resolution-schema.json +0 -151
- package/.claude/workflows/cli-templates/schemas/debug-log-json-schema.json +0 -127
- package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +0 -234
- package/.claude/workflows/cli-templates/schemas/discovery-finding-schema.json +0 -219
- package/.claude/workflows/cli-templates/schemas/discovery-state-schema.json +0 -125
- package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +0 -124
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +0 -298
- package/.claude/workflows/cli-templates/schemas/issues-jsonl-schema.json +0 -170
- package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +0 -421
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +0 -444
- package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +0 -47
- package/.claude/workflows/cli-templates/schemas/project-guidelines-schema.json +0 -141
- package/.claude/workflows/cli-templates/schemas/project-tech-schema.json +0 -221
- package/.claude/workflows/cli-templates/schemas/queue-schema.json +0 -248
- package/.claude/workflows/cli-templates/schemas/registry-schema.json +0 -94
- package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +0 -82
- package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +0 -51
- package/.claude/workflows/cli-templates/schemas/solution-schema.json +0 -166
- package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +0 -158
- package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +0 -91
- package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +0 -107
- package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +0 -58
- package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +0 -79
- package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +0 -103
- package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +0 -83
- package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +0 -247
- package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +0 -342
- package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +0 -145
- package/.claude/workflows/cli-tools-usage.md +0 -538
- package/.claude/workflows/coding-philosophy.md +0 -70
- package/.claude/workflows/context-tools.md +0 -76
- package/.claude/workflows/file-modification.md +0 -64
- package/.claude/workflows/review-directory-specification.md +0 -336
- package/.claude/workflows/task-core.md +0 -214
- package/.claude/workflows/tool-strategy.md +0 -216
- package/.claude/workflows/windows-platform.md +0 -19
- package/.claude/workflows/workflow-architecture.md +0 -942
- package/.codex/agents/ccw-loop-b-complete.md +0 -227
- package/.codex/agents/ccw-loop-b-debug.md +0 -172
- package/.codex/agents/ccw-loop-b-develop.md +0 -147
- package/.codex/agents/ccw-loop-b-init.md +0 -82
- package/.codex/agents/ccw-loop-b-validate.md +0 -204
- package/.codex/agents/ccw-loop-executor.md +0 -260
- package/.codex/prompts/analyze-with-file.md +0 -610
- package/.codex/prompts/brainstorm-to-cycle.md +0 -456
- package/.codex/prompts/brainstorm-with-file.md +0 -1004
- package/.codex/prompts/clean.md +0 -414
- package/.codex/prompts/compact.md +0 -380
- package/.codex/prompts/debug-with-file.md +0 -608
- package/.codex/prompts/execute.md +0 -277
- package/.codex/prompts/issue-discover-by-prompt.md +0 -364
- package/.codex/prompts/issue-discover.md +0 -261
- package/.codex/prompts/issue-execute.md +0 -768
- package/.codex/prompts/issue-new.md +0 -390
- package/.codex/prompts/issue-plan.md +0 -246
- package/.codex/prompts/issue-queue.md +0 -298
- package/.codex/prompts/lite-execute.md +0 -684
- package/.codex/prompts/lite-fix.md +0 -674
- package/.codex/prompts/lite-plan-a.md +0 -341
- package/.codex/prompts/lite-plan-b.md +0 -489
- package/.codex/prompts/lite-plan-c.md +0 -605
- package/.codex/prompts/merge-plans-with-file.md +0 -530
- package/.codex/prompts/unified-execute-with-file.md +0 -722
- package/.codex/skills/ccw-loop/README.md +0 -171
- package/.codex/skills/ccw-loop/SKILL.md +0 -350
- package/.codex/skills/ccw-loop/phases/actions/action-complete.md +0 -269
- package/.codex/skills/ccw-loop/phases/actions/action-debug.md +0 -286
- package/.codex/skills/ccw-loop/phases/actions/action-develop.md +0 -183
- package/.codex/skills/ccw-loop/phases/actions/action-init.md +0 -164
- package/.codex/skills/ccw-loop/phases/actions/action-menu.md +0 -205
- package/.codex/skills/ccw-loop/phases/actions/action-validate.md +0 -250
- package/.codex/skills/ccw-loop/phases/orchestrator.md +0 -416
- package/.codex/skills/ccw-loop/phases/state-schema.md +0 -388
- package/.codex/skills/ccw-loop/specs/action-catalog.md +0 -182
- package/.codex/skills/ccw-loop-b/README.md +0 -301
- package/.codex/skills/ccw-loop-b/SKILL.md +0 -323
- package/.codex/skills/ccw-loop-b/phases/orchestrator.md +0 -257
- package/.codex/skills/ccw-loop-b/phases/state-schema.md +0 -181
- package/.codex/skills/ccw-loop-b/specs/action-catalog.md +0 -383
- package/.codex/skills/codex-issue-plan-execute/SKILL.md +0 -214
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-complete.md +0 -173
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-execute.md +0 -220
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-init.md +0 -86
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-list.md +0 -165
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-plan.md +0 -170
- package/.codex/skills/codex-issue-plan-execute/phases/orchestrator.md +0 -212
- package/.codex/skills/codex-issue-plan-execute/phases/state-schema.md +0 -136
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent-system.md +0 -32
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent.md +0 -323
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent-system.md +0 -32
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent.md +0 -224
- package/.codex/skills/codex-issue-plan-execute/specs/agent-roles.md +0 -468
- package/.codex/skills/codex-issue-plan-execute/specs/issue-handling.md +0 -187
- package/.codex/skills/codex-issue-plan-execute/specs/quality-standards.md +0 -231
- package/.codex/skills/codex-issue-plan-execute/specs/solution-schema.md +0 -270
- package/.codex/skills/codex-issue-plan-execute/specs/subagent-roles.md +0 -32
- package/.codex/skills/parallel-dev-cycle/README.md +0 -385
- package/.codex/skills/parallel-dev-cycle/phases/agents/code-developer.md +0 -327
- package/.codex/skills/parallel-dev-cycle/phases/agents/exploration-planner.md +0 -285
- package/.codex/skills/parallel-dev-cycle/phases/agents/requirements-analyst.md +0 -370
- package/.codex/skills/parallel-dev-cycle/phases/agents/validation-archivist.md +0 -381
- package/.codex/skills/parallel-dev-cycle/phases/orchestrator.md +0 -696
- package/.codex/skills/parallel-dev-cycle/phases/state-schema.md +0 -436
- package/.codex/skills/parallel-dev-cycle/skill.md +0 -194
- package/.codex/skills/parallel-dev-cycle/specs/communication-optimization.md +0 -423
- package/.codex/skills/parallel-dev-cycle/specs/coordination-protocol.md +0 -406
- package/.codex/skills/parallel-dev-cycle/specs/versioning-strategy.md +0 -331
- package/ccw/dist/core/dashboard-generator-patch.d.ts +0 -2
- package/ccw/dist/core/dashboard-generator-patch.d.ts.map +0 -1
- package/ccw/dist/core/dashboard-generator-patch.js +0 -48
- package/ccw/dist/core/dashboard-generator-patch.js.map +0 -1
- package/ccw/dist/core/dashboard-generator.d.ts +0 -8
- package/ccw/dist/core/dashboard-generator.d.ts.map +0 -1
- package/ccw/dist/core/dashboard-generator.js +0 -706
- package/ccw/dist/core/dashboard-generator.js.map +0 -1
- package/ccw/dist/core/routes/model-routes.d.ts +0 -11
- package/ccw/dist/core/routes/model-routes.d.ts.map +0 -1
- package/ccw/dist/core/routes/model-routes.js +0 -112
- package/ccw/dist/core/routes/model-routes.js.map +0 -1
- package/ccw/dist/tools/command-registry.test.d.ts +0 -14
- package/ccw/dist/tools/command-registry.test.d.ts.map +0 -1
- package/ccw/dist/tools/command-registry.test.js.map +0 -1
- package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
- package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
- package/ccw/src/.workflow/.cli-history/history.db +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-shm +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-wal +0 -0
- package/ccw/src/cli.ts +0 -326
- package/ccw/src/commands/cli.ts +0 -1492
- package/ccw/src/commands/core-memory.ts +0 -770
- package/ccw/src/commands/hook.ts +0 -316
- package/ccw/src/commands/install.ts +0 -799
- package/ccw/src/commands/issue.ts +0 -3150
- package/ccw/src/commands/list.ts +0 -37
- package/ccw/src/commands/loop.ts +0 -344
- package/ccw/src/commands/memory.ts +0 -1090
- package/ccw/src/commands/serve.ts +0 -86
- package/ccw/src/commands/session-path-resolver.ts +0 -372
- package/ccw/src/commands/session.ts +0 -1141
- package/ccw/src/commands/stop.ts +0 -138
- package/ccw/src/commands/tool.ts +0 -216
- package/ccw/src/commands/uninstall.ts +0 -309
- package/ccw/src/commands/upgrade.ts +0 -352
- package/ccw/src/commands/view.ts +0 -133
- package/ccw/src/commands/workflow.ts +0 -348
- package/ccw/src/config/.litellm-api-config-manager.ts.2025-12-23T11-57-43-727Z.bak +0 -441
- package/ccw/src/config/cli-settings-manager.ts +0 -460
- package/ccw/src/config/litellm-api-config-manager.ts +0 -1350
- package/ccw/src/config/litellm-provider-models.ts +0 -222
- package/ccw/src/config/provider-models.ts +0 -123
- package/ccw/src/config/storage-paths.ts +0 -685
- package/ccw/src/core/auth/csrf-manager.ts +0 -104
- package/ccw/src/core/auth/csrf-middleware.ts +0 -161
- package/ccw/src/core/auth/middleware.ts +0 -94
- package/ccw/src/core/auth/token-manager.ts +0 -219
- package/ccw/src/core/cache-manager.ts +0 -304
- package/ccw/src/core/claude-freshness.ts +0 -339
- package/ccw/src/core/core-memory-store.ts +0 -1529
- package/ccw/src/core/cors.ts +0 -10
- package/ccw/src/core/dashboard-generator-patch.ts +0 -47
- package/ccw/src/core/dashboard-generator.ts +0 -802
- package/ccw/src/core/data-aggregator.ts +0 -690
- package/ccw/src/core/history-importer.ts +0 -625
- package/ccw/src/core/lite-scanner-complete.ts +0 -473
- package/ccw/src/core/lite-scanner.ts +0 -978
- package/ccw/src/core/manifest.ts +0 -271
- package/ccw/src/core/memory-embedder-bridge.ts +0 -258
- package/ccw/src/core/memory-store.ts +0 -978
- package/ccw/src/core/routes/auth-routes.ts +0 -98
- package/ccw/src/core/routes/ccw-routes.ts +0 -86
- package/ccw/src/core/routes/claude-routes.ts +0 -1512
- package/ccw/src/core/routes/cli-routes.ts +0 -1002
- package/ccw/src/core/routes/cli-settings-routes.ts +0 -279
- package/ccw/src/core/routes/codexlens/README.md +0 -37
- package/ccw/src/core/routes/codexlens/config-handlers.ts +0 -1273
- package/ccw/src/core/routes/codexlens/index-handlers.ts +0 -354
- package/ccw/src/core/routes/codexlens/semantic-handlers.ts +0 -932
- package/ccw/src/core/routes/codexlens/utils.ts +0 -96
- package/ccw/src/core/routes/codexlens/watcher-handlers.ts +0 -265
- package/ccw/src/core/routes/codexlens-routes.ts +0 -23
- package/ccw/src/core/routes/commands-routes.ts +0 -620
- package/ccw/src/core/routes/core-memory-routes.ts +0 -607
- package/ccw/src/core/routes/discovery-routes.ts +0 -664
- package/ccw/src/core/routes/files-routes.ts +0 -502
- package/ccw/src/core/routes/graph-routes.md +0 -164
- package/ccw/src/core/routes/graph-routes.ts +0 -635
- package/ccw/src/core/routes/help-routes.ts +0 -508
- package/ccw/src/core/routes/hooks-routes.ts +0 -473
- package/ccw/src/core/routes/issue-routes.ts +0 -1547
- package/ccw/src/core/routes/litellm-api-routes.ts +0 -1482
- package/ccw/src/core/routes/litellm-routes.ts +0 -115
- package/ccw/src/core/routes/loop-routes.ts +0 -386
- package/ccw/src/core/routes/loop-v2-routes.ts +0 -1470
- package/ccw/src/core/routes/mcp-routes.ts +0 -1372
- package/ccw/src/core/routes/mcp-templates-db.ts +0 -267
- package/ccw/src/core/routes/memory-routes.ts +0 -1345
- package/ccw/src/core/routes/nav-status-routes.ts +0 -325
- package/ccw/src/core/routes/provider-routes.ts +0 -78
- package/ccw/src/core/routes/rules-routes.ts +0 -1064
- package/ccw/src/core/routes/session-routes.ts +0 -649
- package/ccw/src/core/routes/skills-routes.ts +0 -1278
- package/ccw/src/core/routes/status-routes.ts +0 -132
- package/ccw/src/core/routes/system-routes.ts +0 -575
- package/ccw/src/core/routes/task-routes.ts +0 -361
- package/ccw/src/core/routes/test-loop-routes.ts +0 -312
- package/ccw/src/core/routes/types.ts +0 -25
- package/ccw/src/core/server.ts +0 -776
- package/ccw/src/core/services/api-key-tester.ts +0 -166
- package/ccw/src/core/services/health-check-service.ts +0 -366
- package/ccw/src/core/session-clustering-service.ts +0 -1258
- package/ccw/src/core/session-scanner.ts +0 -283
- package/ccw/src/core/websocket.ts +0 -302
- package/ccw/src/index.ts +0 -10
- package/ccw/src/mcp-server/index.ts +0 -191
- package/ccw/src/templates/assets/css/github-dark.min.css +0 -10
- package/ccw/src/templates/assets/css/github.min.css +0 -10
- package/ccw/src/templates/assets/js/cytoscape.min.js +0 -32
- package/ccw/src/templates/assets/js/d3.min.js +0 -2
- package/ccw/src/templates/assets/js/highlight.min.js +0 -1244
- package/ccw/src/templates/assets/js/lucide.min.js +0 -12
- package/ccw/src/templates/assets/js/marked.min.js +0 -69
- package/ccw/src/templates/assets/js/tailwind.js +0 -83
- package/ccw/src/templates/dashboard-css/01-base.css +0 -419
- package/ccw/src/templates/dashboard-css/02-session.css +0 -831
- package/ccw/src/templates/dashboard-css/03-tasks.css +0 -517
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +0 -4354
- package/ccw/src/templates/dashboard-css/05-context.css +0 -2206
- package/ccw/src/templates/dashboard-css/06-cards.css +0 -1576
- package/ccw/src/templates/dashboard-css/07-managers.css +0 -2107
- package/ccw/src/templates/dashboard-css/08-review.css +0 -1266
- package/ccw/src/templates/dashboard-css/09-explorer.css +0 -1408
- package/ccw/src/templates/dashboard-css/10-cli-status.css +0 -539
- package/ccw/src/templates/dashboard-css/11-cli-history.css +0 -271
- package/ccw/src/templates/dashboard-css/12-cli-legacy.css +0 -896
- package/ccw/src/templates/dashboard-css/13-cli-ccw.css +0 -199
- package/ccw/src/templates/dashboard-css/14-cli-modals.css +0 -258
- package/ccw/src/templates/dashboard-css/15-cli-endpoints.css +0 -305
- package/ccw/src/templates/dashboard-css/16-cli-session.css +0 -241
- package/ccw/src/templates/dashboard-css/17-cli-conversation.css +0 -283
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +0 -229
- package/ccw/src/templates/dashboard-css/19-cli-native-session.css +0 -496
- package/ccw/src/templates/dashboard-css/20-cli-taskqueue.css +0 -188
- package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +0 -820
- package/ccw/src/templates/dashboard-css/22-cli-semantic.css +0 -240
- package/ccw/src/templates/dashboard-css/23-memory.css +0 -2390
- package/ccw/src/templates/dashboard-css/24-prompt-history.css +0 -1089
- package/ccw/src/templates/dashboard-css/25-skills-rules.css +0 -326
- package/ccw/src/templates/dashboard-css/26-claude-manager.css +0 -1087
- package/ccw/src/templates/dashboard-css/27-graph-explorer.css +0 -1678
- package/ccw/src/templates/dashboard-css/28-mcp-manager.css +0 -748
- package/ccw/src/templates/dashboard-css/29-help.css +0 -264
- package/ccw/src/templates/dashboard-css/30-core-memory.css +0 -1720
- package/ccw/src/templates/dashboard-css/31-api-settings.css +0 -3002
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +0 -3619
- package/ccw/src/templates/dashboard-css/33-cli-stream-viewer.css +0 -860
- package/ccw/src/templates/dashboard-css/34-discovery.css +0 -783
- package/ccw/src/templates/dashboard-css/36-loop-monitor.css +0 -1896
- package/ccw/src/templates/dashboard-css/36-loop-monitor.css.backup +0 -1877
- package/ccw/src/templates/dashboard-css/37-commands.css +0 -193
- package/ccw/src/templates/dashboard-js/api.js +0 -225
- package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +0 -112
- package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +0 -54
- package/ccw/src/templates/dashboard-js/components/_review_tab.js +0 -640
- package/ccw/src/templates/dashboard-js/components/carousel.js +0 -398
- package/ccw/src/templates/dashboard-js/components/cli-history.js +0 -913
- package/ccw/src/templates/dashboard-js/components/cli-status.js +0 -1617
- package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +0 -985
- package/ccw/src/templates/dashboard-js/components/flowchart.js +0 -493
- package/ccw/src/templates/dashboard-js/components/global-notifications.js +0 -508
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +0 -1493
- package/ccw/src/templates/dashboard-js/components/index-manager.js +0 -302
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +0 -1760
- package/ccw/src/templates/dashboard-js/components/modals.js +0 -326
- package/ccw/src/templates/dashboard-js/components/navigation.js +0 -430
- package/ccw/src/templates/dashboard-js/components/notifications.js +0 -934
- package/ccw/src/templates/dashboard-js/components/sidebar.js +0 -31
- package/ccw/src/templates/dashboard-js/components/storage-manager.js +0 -478
- package/ccw/src/templates/dashboard-js/components/tabs-context.js +0 -1093
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +0 -424
- package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +0 -477
- package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +0 -447
- package/ccw/src/templates/dashboard-js/components/task-queue-sidebar.js +0 -716
- package/ccw/src/templates/dashboard-js/components/theme.js +0 -49
- package/ccw/src/templates/dashboard-js/components/version-check.js +0 -339
- package/ccw/src/templates/dashboard-js/help-i18n.js +0 -272
- package/ccw/src/templates/dashboard-js/i18n.js +0 -5558
- package/ccw/src/templates/dashboard-js/main.js +0 -158
- package/ccw/src/templates/dashboard-js/services.js +0 -289
- package/ccw/src/templates/dashboard-js/state.js +0 -245
- package/ccw/src/templates/dashboard-js/utils.js +0 -199
- package/ccw/src/templates/dashboard-js/views/api-settings.js +0 -5646
- package/ccw/src/templates/dashboard-js/views/claude-manager.js +0 -1129
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +0 -3615
- package/ccw/src/templates/dashboard-js/views/codexlens-manager.js +0 -7123
- package/ccw/src/templates/dashboard-js/views/commands-manager.js +0 -503
- package/ccw/src/templates/dashboard-js/views/core-memory-clusters.js +0 -503
- package/ccw/src/templates/dashboard-js/views/core-memory.js +0 -891
- package/ccw/src/templates/dashboard-js/views/explorer.js +0 -888
- package/ccw/src/templates/dashboard-js/views/fix-session.js +0 -180
- package/ccw/src/templates/dashboard-js/views/graph-explorer.js +0 -1157
- package/ccw/src/templates/dashboard-js/views/help.js +0 -1278
- package/ccw/src/templates/dashboard-js/views/history.js +0 -390
- package/ccw/src/templates/dashboard-js/views/home.js +0 -244
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +0 -696
- package/ccw/src/templates/dashboard-js/views/issue-discovery.js +0 -730
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +0 -3248
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +0 -3546
- package/ccw/src/templates/dashboard-js/views/loop-monitor.js +0 -3345
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +0 -2261
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.backup +0 -1729
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.new +0 -928
- package/ccw/src/templates/dashboard-js/views/memory.js +0 -1221
- package/ccw/src/templates/dashboard-js/views/project-overview.js +0 -548
- package/ccw/src/templates/dashboard-js/views/prompt-history.js +0 -713
- package/ccw/src/templates/dashboard-js/views/review-session.js +0 -1030
- package/ccw/src/templates/dashboard-js/views/rules-manager.js +0 -880
- package/ccw/src/templates/dashboard-js/views/session-detail.js +0 -781
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +0 -1282
- package/ccw/src/templates/dashboard.html +0 -1104
- package/ccw/src/templates/hooks-config-example.json +0 -60
- package/ccw/src/templates/review-cycle-dashboard.html +0 -1930
- package/ccw/src/templates/workflow-dashboard.html +0 -401
- package/ccw/src/tools/README.md +0 -29
- package/ccw/src/tools/classify-folders.ts +0 -245
- package/ccw/src/tools/claude-cli-tools.ts +0 -1271
- package/ccw/src/tools/cli-config-manager.ts +0 -169
- package/ccw/src/tools/cli-executor-core.ts +0 -1665
- package/ccw/src/tools/cli-executor-state.ts +0 -562
- package/ccw/src/tools/cli-executor-utils.ts +0 -394
- package/ccw/src/tools/cli-executor.ts +0 -7
- package/ccw/src/tools/cli-history-store.ts +0 -1498
- package/ccw/src/tools/cli-output-converter.ts +0 -1301
- package/ccw/src/tools/cli-prompt-builder.ts +0 -487
- package/ccw/src/tools/codex-lens-lsp.ts +0 -402
- package/ccw/src/tools/codex-lens.ts +0 -1863
- package/ccw/src/tools/command-registry.test.ts +0 -669
- package/ccw/src/tools/command-registry.ts +0 -323
- package/ccw/src/tools/context-cache-store.ts +0 -368
- package/ccw/src/tools/context-cache.ts +0 -393
- package/ccw/src/tools/convert-tokens-to-css.ts +0 -300
- package/ccw/src/tools/core-memory.ts +0 -458
- package/ccw/src/tools/detect-changed-modules.ts +0 -343
- package/ccw/src/tools/discover-design-files.ts +0 -184
- package/ccw/src/tools/edit-file.ts +0 -568
- package/ccw/src/tools/generate-module-docs.ts +0 -442
- package/ccw/src/tools/get-modules-by-depth.ts +0 -349
- package/ccw/src/tools/index.ts +0 -384
- package/ccw/src/tools/litellm-client.ts +0 -288
- package/ccw/src/tools/litellm-executor.ts +0 -360
- package/ccw/src/tools/loop-manager.ts +0 -519
- package/ccw/src/tools/loop-state-manager.ts +0 -173
- package/ccw/src/tools/loop-task-manager.ts +0 -391
- package/ccw/src/tools/memory-update-queue.js +0 -493
- package/ccw/src/tools/native-session-discovery.ts +0 -1034
- package/ccw/src/tools/notifier.ts +0 -129
- package/ccw/src/tools/pattern-parser.ts +0 -329
- package/ccw/src/tools/read-file.ts +0 -410
- package/ccw/src/tools/resume-strategy.ts +0 -345
- package/ccw/src/tools/session-content-parser.ts +0 -619
- package/ccw/src/tools/session-manager.ts +0 -1114
- package/ccw/src/tools/skill-context-loader.ts +0 -213
- package/ccw/src/tools/smart-context.ts +0 -228
- package/ccw/src/tools/smart-search.ts +0 -2658
- package/ccw/src/tools/smart-search.ts.backup +0 -1233
- package/ccw/src/tools/storage-manager.ts +0 -455
- package/ccw/src/tools/template-discovery.ts +0 -303
- package/ccw/src/tools/ui-generate-preview.js +0 -350
- package/ccw/src/tools/ui-instantiate-prototypes.js +0 -301
- package/ccw/src/tools/update-module-claude.js +0 -380
- package/ccw/src/tools/vscode-lsp.ts +0 -317
- package/ccw/src/tools/write-file.ts +0 -222
- package/ccw/src/types/cli-settings.ts +0 -137
- package/ccw/src/types/config.ts +0 -11
- package/ccw/src/types/index.ts +0 -4
- package/ccw/src/types/litellm-api-config.ts +0 -456
- package/ccw/src/types/loop.ts +0 -316
- package/ccw/src/types/session.ts +0 -25
- package/ccw/src/types/skill-types.ts +0 -99
- package/ccw/src/types/tool.ts +0 -41
- package/ccw/src/utils/browser-launcher.ts +0 -62
- package/ccw/src/utils/codexlens-path.ts +0 -60
- package/ccw/src/utils/exec-constants.ts +0 -24
- package/ccw/src/utils/file-utils.ts +0 -48
- package/ccw/src/utils/path-resolver.ts +0 -392
- package/ccw/src/utils/path-validator.ts +0 -187
- package/ccw/src/utils/project-root.ts +0 -73
- package/ccw/src/utils/python-utils.ts +0 -140
- package/ccw/src/utils/shell-escape.ts +0 -117
- package/ccw/src/utils/ui.ts +0 -155
- package/ccw/src/utils/update-checker.ts +0 -178
- package/ccw/src/utils/uv-manager.ts +0 -797
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/cli.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/.workflow/.cli-history/history.db +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/definition.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/definition.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/file_context.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/file_context.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/hover.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/hover.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/models.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/models.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/references.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/references.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/semantic.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/semantic.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/symbols.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/symbols.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/utils.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/utils.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/data_structures.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/data_structures.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/engine.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/embedding.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/symbol_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/handlers.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_bridge.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_bridge.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_graph_builder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_graph_builder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/providers.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/server.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/standalone_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/hooks.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/provider.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/schema.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/encoding.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/binary_searcher.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/enrichment.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/graph_expander.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/query_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/builder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/data_structures.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/deduplicator.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/dbscan_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/frequency_strategy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/frequency_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/hdbscan_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/noop_strategy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/noop_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/SPLADE_IMPLEMENTATION.md +0 -225
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/code_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/graph_analyzer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/llm_enhancer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ollama_backend.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/litellm_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/splade_encoder.py +0 -567
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/file_cache.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/merkle_tree.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/migration_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_001_normalize_keywords.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_002_add_token_metadata.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_003_code_relationships.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_004_dual_fts.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_005_cleanup_unused_fields.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_006_enhance_relationships.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_008_add_merkle_hashes.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_009_add_splade.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_010_add_multi_vector_chunks.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_009_add_splade.py +0 -103
- package/codex-lens/src/codexlens/storage/splade_index.py +0 -578
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-313.pyc +0 -0
|
@@ -1,3546 +0,0 @@
|
|
|
1
|
-
// ============================================
|
|
2
|
-
// LITE TASKS VIEW
|
|
3
|
-
// ============================================
|
|
4
|
-
// Lite-plan and lite-fix task list and detail rendering
|
|
5
|
-
|
|
6
|
-
function renderLiteTasks() {
|
|
7
|
-
const container = document.getElementById('mainContent');
|
|
8
|
-
|
|
9
|
-
const liteTasks = workflowData.liteTasks || {};
|
|
10
|
-
let sessions;
|
|
11
|
-
|
|
12
|
-
if (currentLiteType === 'lite-plan') {
|
|
13
|
-
sessions = liteTasks.litePlan || [];
|
|
14
|
-
} else if (currentLiteType === 'lite-fix') {
|
|
15
|
-
sessions = liteTasks.liteFix || [];
|
|
16
|
-
} else if (currentLiteType === 'multi-cli-plan') {
|
|
17
|
-
sessions = liteTasks.multiCliPlan || [];
|
|
18
|
-
} else {
|
|
19
|
-
sessions = [];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (sessions.length === 0) {
|
|
23
|
-
container.innerHTML = `
|
|
24
|
-
<div class="empty-state">
|
|
25
|
-
<div class="empty-icon"><i data-lucide="zap" class="w-12 h-12"></i></div>
|
|
26
|
-
<div class="empty-title">${t('empty.noLiteSessions', { type: currentLiteType })}</div>
|
|
27
|
-
<div class="empty-text">${t('empty.noLiteSessionsText', { type: currentLiteType })}</div>
|
|
28
|
-
</div>
|
|
29
|
-
`;
|
|
30
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Render based on type
|
|
35
|
-
if (currentLiteType === 'multi-cli-plan') {
|
|
36
|
-
container.innerHTML = `<div class="sessions-grid">${sessions.map(session => renderMultiCliCard(session)).join('')}</div>`;
|
|
37
|
-
} else {
|
|
38
|
-
container.innerHTML = `<div class="sessions-grid">${sessions.map(session => renderLiteTaskCard(session)).join('')}</div>`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Initialize Lucide icons
|
|
42
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
43
|
-
|
|
44
|
-
// Initialize collapsible sections
|
|
45
|
-
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
46
|
-
header.addEventListener('click', () => toggleSection(header));
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Render flowcharts for expanded tasks
|
|
50
|
-
sessions.forEach(session => {
|
|
51
|
-
session.tasks?.forEach(task => {
|
|
52
|
-
if (task.flow_control?.implementation_approach) {
|
|
53
|
-
renderFlowchartForTask(session.id, task);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function renderLiteTaskCard(session) {
|
|
60
|
-
const tasks = session.tasks || [];
|
|
61
|
-
|
|
62
|
-
// Store session data for detail page
|
|
63
|
-
const sessionKey = `lite-${session.type}-${session.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
64
|
-
liteTaskDataStore[sessionKey] = session;
|
|
65
|
-
|
|
66
|
-
return `
|
|
67
|
-
<div class="session-card lite-task-card" onclick="showLiteTaskDetailPage('${sessionKey}')" style="cursor: pointer;">
|
|
68
|
-
<div class="session-header">
|
|
69
|
-
<div class="session-title">${escapeHtml(session.id)}</div>
|
|
70
|
-
<span class="session-status ${session.type}">
|
|
71
|
-
${session.type === 'lite-plan' ? '<i data-lucide="file-edit" class="w-3 h-3 inline"></i> ' + t('lite.plan') : '<i data-lucide="wrench" class="w-3 h-3 inline"></i> ' + t('lite.fix')}
|
|
72
|
-
</span>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="session-body">
|
|
75
|
-
<div class="session-meta">
|
|
76
|
-
<span class="session-meta-item"><i data-lucide="calendar" class="w-3.5 h-3.5 inline mr-1"></i>${formatDate(session.createdAt)}</span>
|
|
77
|
-
<span class="session-meta-item"><i data-lucide="list-checks" class="w-3.5 h-3.5 inline mr-1"></i>${tasks.length} ${t('session.tasks')}</span>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
`;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// ============================================
|
|
85
|
-
// MULTI-CLI PLAN VIEW
|
|
86
|
-
// ============================================
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Render a card for multi-cli-plan session
|
|
90
|
-
* Shows: Session ID, round count, topic title, status, created date
|
|
91
|
-
*/
|
|
92
|
-
function renderMultiCliCard(session) {
|
|
93
|
-
const sessionKey = `multi-cli-${session.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
94
|
-
liteTaskDataStore[sessionKey] = session;
|
|
95
|
-
|
|
96
|
-
// Extract info from latest synthesis or metadata
|
|
97
|
-
const metadata = session.metadata || {};
|
|
98
|
-
const latestSynthesis = session.latestSynthesis || session.discussionTopic || {};
|
|
99
|
-
const roundCount = metadata.roundId || session.roundCount || 1;
|
|
100
|
-
const topicTitle = getI18nText(latestSynthesis.title) || session.topicTitle || 'Discussion Topic';
|
|
101
|
-
const status = latestSynthesis.status || session.status || 'analyzing';
|
|
102
|
-
const createdAt = metadata.timestamp || session.createdAt || '';
|
|
103
|
-
|
|
104
|
-
// Status badge color mapping
|
|
105
|
-
const statusColors = {
|
|
106
|
-
'decided': 'success',
|
|
107
|
-
'converged': 'success',
|
|
108
|
-
'plan_generated': 'success',
|
|
109
|
-
'completed': 'success',
|
|
110
|
-
'exploring': 'info',
|
|
111
|
-
'initialized': 'info',
|
|
112
|
-
'analyzing': 'warning',
|
|
113
|
-
'debating': 'warning',
|
|
114
|
-
'blocked': 'error',
|
|
115
|
-
'conflict': 'error'
|
|
116
|
-
};
|
|
117
|
-
const statusColor = statusColors[status] || 'default';
|
|
118
|
-
|
|
119
|
-
return `
|
|
120
|
-
<div class="session-card multi-cli-card" onclick="showMultiCliDetailPage('${sessionKey}')" style="cursor: pointer;">
|
|
121
|
-
<div class="session-header">
|
|
122
|
-
<div class="session-title">${escapeHtml(session.id)}</div>
|
|
123
|
-
<span class="session-status multi-cli-plan">
|
|
124
|
-
<i data-lucide="messages-square" class="w-3 h-3 inline"></i> ${t('lite.multiCli') || 'Multi-CLI'}
|
|
125
|
-
</span>
|
|
126
|
-
</div>
|
|
127
|
-
<div class="session-body">
|
|
128
|
-
<div class="multi-cli-topic">
|
|
129
|
-
<i data-lucide="message-circle" class="w-4 h-4 inline mr-1"></i>
|
|
130
|
-
<span class="topic-title">${escapeHtml(topicTitle)}</span>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="session-meta">
|
|
133
|
-
<span class="session-meta-item"><i data-lucide="calendar" class="w-3.5 h-3.5 inline mr-1"></i>${formatDate(createdAt)}</span>
|
|
134
|
-
<span class="session-meta-item"><i data-lucide="repeat" class="w-3.5 h-3.5 inline mr-1"></i>${roundCount} ${t('multiCli.rounds') || 'rounds'}</span>
|
|
135
|
-
<span class="session-meta-item status-badge ${statusColor}"><i data-lucide="activity" class="w-3.5 h-3.5 inline mr-1"></i>${escapeHtml(status)}</span>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
`;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Get text from i18n label object (supports {en, zh} format)
|
|
144
|
-
*/
|
|
145
|
-
function getI18nText(label) {
|
|
146
|
-
if (!label) return '';
|
|
147
|
-
if (typeof label === 'string') return label;
|
|
148
|
-
// Return based on current language or default to English
|
|
149
|
-
const lang = window.currentLanguage || 'en';
|
|
150
|
-
return label[lang] || label.en || label.zh || '';
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// ============================================
|
|
154
|
-
// SYNTHESIS DATA TRANSFORMATION HELPERS
|
|
155
|
-
// ============================================
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Extract files from synthesis solutions[].implementation_plan.tasks[].files
|
|
159
|
-
* Returns object with fileTree and impactSummary arrays
|
|
160
|
-
*/
|
|
161
|
-
function extractFilesFromSynthesis(synthesis) {
|
|
162
|
-
if (!synthesis || !synthesis.solutions) {
|
|
163
|
-
return { fileTree: [], impactSummary: [], dependencyGraph: [] };
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
const fileSet = new Set();
|
|
167
|
-
const impactMap = new Map();
|
|
168
|
-
|
|
169
|
-
synthesis.solutions.forEach(solution => {
|
|
170
|
-
const tasks = solution.implementation_plan?.tasks || [];
|
|
171
|
-
tasks.forEach(task => {
|
|
172
|
-
const files = task.files || [];
|
|
173
|
-
files.forEach(filePath => {
|
|
174
|
-
fileSet.add(filePath);
|
|
175
|
-
// Build impact summary based on task context
|
|
176
|
-
if (!impactMap.has(filePath)) {
|
|
177
|
-
impactMap.set(filePath, {
|
|
178
|
-
filePath: filePath,
|
|
179
|
-
score: 'medium',
|
|
180
|
-
reasoning: { en: `Part of ${solution.title?.en || solution.id} implementation`, zh: `${solution.title?.zh || solution.id} 实现的一部分` }
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// Convert to fileTree format (flat list with file type)
|
|
188
|
-
const fileTree = Array.from(fileSet).map(path => ({
|
|
189
|
-
path: path,
|
|
190
|
-
type: 'file',
|
|
191
|
-
modificationStatus: 'modified',
|
|
192
|
-
impactScore: 'medium'
|
|
193
|
-
}));
|
|
194
|
-
|
|
195
|
-
return {
|
|
196
|
-
fileTree: fileTree,
|
|
197
|
-
impactSummary: Array.from(impactMap.values()),
|
|
198
|
-
dependencyGraph: []
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Extract planning data from synthesis solutions[].implementation_plan
|
|
204
|
-
* Builds planning object with functional requirements format
|
|
205
|
-
*/
|
|
206
|
-
function extractPlanningFromSynthesis(synthesis) {
|
|
207
|
-
if (!synthesis || !synthesis.solutions) {
|
|
208
|
-
return { functional: [], nonFunctional: [], acceptanceCriteria: [] };
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const functional = [];
|
|
212
|
-
const acceptanceCriteria = [];
|
|
213
|
-
let reqCounter = 1;
|
|
214
|
-
let acCounter = 1;
|
|
215
|
-
|
|
216
|
-
synthesis.solutions.forEach(solution => {
|
|
217
|
-
const plan = solution.implementation_plan;
|
|
218
|
-
if (!plan) return;
|
|
219
|
-
|
|
220
|
-
// Extract approach as functional requirement
|
|
221
|
-
if (plan.approach) {
|
|
222
|
-
functional.push({
|
|
223
|
-
id: `FR-${String(reqCounter++).padStart(3, '0')}`,
|
|
224
|
-
description: plan.approach,
|
|
225
|
-
priority: solution.feasibility?.score >= 0.8 ? 'high' : 'medium',
|
|
226
|
-
source: solution.id
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Extract tasks as acceptance criteria
|
|
231
|
-
const tasks = plan.tasks || [];
|
|
232
|
-
tasks.forEach(task => {
|
|
233
|
-
acceptanceCriteria.push({
|
|
234
|
-
id: `AC-${String(acCounter++).padStart(3, '0')}`,
|
|
235
|
-
description: task.title || { en: task.id, zh: task.id },
|
|
236
|
-
isMet: false
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
return {
|
|
242
|
-
functional: functional,
|
|
243
|
-
nonFunctional: [],
|
|
244
|
-
acceptanceCriteria: acceptanceCriteria
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Extract decision data from synthesis solutions
|
|
250
|
-
* Sorts by feasibility score, returns highest as selected, rest as rejected
|
|
251
|
-
*/
|
|
252
|
-
function extractDecisionFromSynthesis(synthesis) {
|
|
253
|
-
if (!synthesis || !synthesis.solutions || synthesis.solutions.length === 0) {
|
|
254
|
-
return {};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Sort solutions by feasibility score (highest first)
|
|
258
|
-
const sortedSolutions = [...synthesis.solutions].sort((a, b) => {
|
|
259
|
-
const scoreA = a.feasibility?.score || 0;
|
|
260
|
-
const scoreB = b.feasibility?.score || 0;
|
|
261
|
-
return scoreB - scoreA;
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
const selectedSolution = sortedSolutions[0];
|
|
265
|
-
const rejectedAlternatives = sortedSolutions.slice(1).map(sol => ({
|
|
266
|
-
...sol,
|
|
267
|
-
rejectionReason: sol.cons?.length > 0 ? sol.cons[0] : { en: 'Lower feasibility score', zh: '可行性评分较低' }
|
|
268
|
-
}));
|
|
269
|
-
|
|
270
|
-
// Calculate confidence from convergence level
|
|
271
|
-
let confidenceScore = 0.5;
|
|
272
|
-
if (synthesis.convergence) {
|
|
273
|
-
const level = synthesis.convergence.level;
|
|
274
|
-
if (level === 'high' || level === 'converged') confidenceScore = 0.9;
|
|
275
|
-
else if (level === 'medium') confidenceScore = 0.7;
|
|
276
|
-
else if (level === 'low') confidenceScore = 0.4;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return {
|
|
280
|
-
status: synthesis.convergence?.recommendation || 'pending',
|
|
281
|
-
summary: synthesis.convergence?.summary || {},
|
|
282
|
-
selectedSolution: selectedSolution,
|
|
283
|
-
rejectedAlternatives: rejectedAlternatives,
|
|
284
|
-
confidenceScore: confidenceScore
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Extract timeline data from synthesis convergence and cross_verification
|
|
290
|
-
* Builds timeline array with events from discussion process
|
|
291
|
-
*/
|
|
292
|
-
function extractTimelineFromSynthesis(synthesis) {
|
|
293
|
-
if (!synthesis) {
|
|
294
|
-
return [];
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
const timeline = [];
|
|
298
|
-
const now = new Date().toISOString();
|
|
299
|
-
|
|
300
|
-
// Add convergence summary as decision event
|
|
301
|
-
if (synthesis.convergence?.summary) {
|
|
302
|
-
timeline.push({
|
|
303
|
-
type: 'decision',
|
|
304
|
-
timestamp: now,
|
|
305
|
-
summary: synthesis.convergence.summary,
|
|
306
|
-
contributor: { name: 'Synthesis', id: 'synthesis' },
|
|
307
|
-
reversibility: synthesis.convergence.recommendation === 'proceed' ? 'irreversible' : 'reversible'
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// Add cross-verification agreements as agreement events
|
|
312
|
-
const agreements = synthesis.cross_verification?.agreements || [];
|
|
313
|
-
agreements.forEach((agreement, idx) => {
|
|
314
|
-
timeline.push({
|
|
315
|
-
type: 'agreement',
|
|
316
|
-
timestamp: now,
|
|
317
|
-
summary: typeof agreement === 'string' ? { en: agreement, zh: agreement } : agreement,
|
|
318
|
-
contributor: { name: 'Cross-Verification', id: 'cross-verify' },
|
|
319
|
-
evidence: []
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// Add cross-verification disagreements as disagreement events
|
|
324
|
-
const disagreements = synthesis.cross_verification?.disagreements || [];
|
|
325
|
-
disagreements.forEach((disagreement, idx) => {
|
|
326
|
-
timeline.push({
|
|
327
|
-
type: 'disagreement',
|
|
328
|
-
timestamp: now,
|
|
329
|
-
summary: typeof disagreement === 'string' ? { en: disagreement, zh: disagreement } : disagreement,
|
|
330
|
-
contributor: { name: 'Cross-Verification', id: 'cross-verify' },
|
|
331
|
-
evidence: []
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
// Add solutions as proposal events
|
|
336
|
-
const solutions = synthesis.solutions || [];
|
|
337
|
-
solutions.forEach(solution => {
|
|
338
|
-
timeline.push({
|
|
339
|
-
type: 'proposal',
|
|
340
|
-
timestamp: now,
|
|
341
|
-
summary: solution.description || solution.title || {},
|
|
342
|
-
contributor: { name: solution.id, id: solution.id },
|
|
343
|
-
evidence: solution.pros?.map(p => ({ type: 'pro', description: p })) || []
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
return timeline;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Show multi-cli detail page with tabs (same layout as lite-plan)
|
|
352
|
-
*/
|
|
353
|
-
function showMultiCliDetailPage(sessionKey) {
|
|
354
|
-
const session = liteTaskDataStore[sessionKey];
|
|
355
|
-
if (!session) return;
|
|
356
|
-
|
|
357
|
-
currentView = 'multiCliDetail';
|
|
358
|
-
currentSessionDetailKey = sessionKey;
|
|
359
|
-
|
|
360
|
-
hideStatsAndCarousel();
|
|
361
|
-
|
|
362
|
-
const container = document.getElementById('mainContent');
|
|
363
|
-
const metadata = session.metadata || {};
|
|
364
|
-
const plan = session.plan || {};
|
|
365
|
-
// Use session.tasks (normalized from backend) with fallback to plan.tasks
|
|
366
|
-
const tasks = session.tasks?.length > 0 ? session.tasks : (plan.tasks || []);
|
|
367
|
-
const roundCount = metadata.roundId || session.roundCount || 1;
|
|
368
|
-
const status = session.status || 'analyzing';
|
|
369
|
-
|
|
370
|
-
container.innerHTML = `
|
|
371
|
-
<div class="session-detail-page lite-task-detail-page">
|
|
372
|
-
<!-- Header -->
|
|
373
|
-
<div class="detail-header">
|
|
374
|
-
<button class="btn-back" onclick="goBackToLiteTasks()">
|
|
375
|
-
<span class="back-icon">←</span>
|
|
376
|
-
<span>${t('multiCli.backToList') || 'Back to Multi-CLI Plan'}</span>
|
|
377
|
-
</button>
|
|
378
|
-
<div class="detail-title-row">
|
|
379
|
-
<h2 class="detail-session-id"><i data-lucide="messages-square" class="w-5 h-5 inline mr-2"></i> ${escapeHtml(session.id)}</h2>
|
|
380
|
-
<div class="detail-badges">
|
|
381
|
-
<span class="session-type-badge multi-cli-plan">MULTI-CLI</span>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
</div>
|
|
385
|
-
|
|
386
|
-
<!-- Session Info Bar -->
|
|
387
|
-
<div class="detail-info-bar">
|
|
388
|
-
<div class="info-item">
|
|
389
|
-
<span class="info-label">${t('detail.created') || 'Created'}</span>
|
|
390
|
-
<span class="info-value">${formatDate(metadata.timestamp || session.createdAt)}</span>
|
|
391
|
-
</div>
|
|
392
|
-
<div class="info-item">
|
|
393
|
-
<span class="info-label">${t('detail.tasks') || 'Tasks'}</span>
|
|
394
|
-
<span class="info-value">${tasks.length} ${t('session.tasks') || 'tasks'}</span>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
<!-- Tab Navigation (same as lite-plan) -->
|
|
399
|
-
<div class="detail-tabs">
|
|
400
|
-
<button class="detail-tab active" data-tab="tasks" onclick="switchMultiCliDetailTab('tasks')">
|
|
401
|
-
<span class="tab-icon"><i data-lucide="list-checks" class="w-4 h-4"></i></span>
|
|
402
|
-
<span class="tab-text">${t('tab.tasks') || 'Tasks'}</span>
|
|
403
|
-
<span class="tab-count">${tasks.length}</span>
|
|
404
|
-
</button>
|
|
405
|
-
<button class="detail-tab" data-tab="discussion" onclick="switchMultiCliDetailTab('discussion')">
|
|
406
|
-
<span class="tab-icon"><i data-lucide="messages-square" class="w-4 h-4"></i></span>
|
|
407
|
-
<span class="tab-text">${t('multiCli.tab.discussion') || 'Discussion'}</span>
|
|
408
|
-
<span class="tab-count">${roundCount}</span>
|
|
409
|
-
</button>
|
|
410
|
-
<button class="detail-tab" data-tab="context" onclick="switchMultiCliDetailTab('context')">
|
|
411
|
-
<span class="tab-icon"><i data-lucide="package" class="w-4 h-4"></i></span>
|
|
412
|
-
<span class="tab-text">${t('tab.context') || 'Context'}</span>
|
|
413
|
-
</button>
|
|
414
|
-
<button class="detail-tab" data-tab="summary" onclick="switchMultiCliDetailTab('summary')">
|
|
415
|
-
<span class="tab-icon"><i data-lucide="file-text" class="w-4 h-4"></i></span>
|
|
416
|
-
<span class="tab-text">${t('tab.summary') || 'Summary'}</span>
|
|
417
|
-
</button>
|
|
418
|
-
</div>
|
|
419
|
-
|
|
420
|
-
<!-- Tab Content -->
|
|
421
|
-
<div class="detail-tab-content active" id="multiCliDetailTabContent">
|
|
422
|
-
${renderMultiCliTasksTab(session)}
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
`;
|
|
426
|
-
|
|
427
|
-
// Initialize icons, collapsible sections, and task click handlers
|
|
428
|
-
setTimeout(() => {
|
|
429
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
430
|
-
initCollapsibleSections(container);
|
|
431
|
-
initMultiCliTaskClickHandlers();
|
|
432
|
-
}, 50);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Render the multi-cli toolbar content
|
|
437
|
-
*/
|
|
438
|
-
function renderMultiCliToolbar(session) {
|
|
439
|
-
const plan = session.plan;
|
|
440
|
-
// Use session.tasks (normalized from backend) with fallback to plan.tasks
|
|
441
|
-
const tasks = session.tasks?.length > 0 ? session.tasks : (plan?.tasks || []);
|
|
442
|
-
const taskCount = tasks.length;
|
|
443
|
-
|
|
444
|
-
let toolbarHtml = `
|
|
445
|
-
<div class="toolbar-header">
|
|
446
|
-
<h4 class="toolbar-title">
|
|
447
|
-
<i data-lucide="list-checks" class="w-4 h-4"></i>
|
|
448
|
-
<span>${t('multiCli.toolbar.tasks') || 'Tasks'}</span>
|
|
449
|
-
<span class="toolbar-count">${taskCount}</span>
|
|
450
|
-
</h4>
|
|
451
|
-
</div>
|
|
452
|
-
`;
|
|
453
|
-
|
|
454
|
-
// Quick Actions
|
|
455
|
-
toolbarHtml += `
|
|
456
|
-
<div class="toolbar-actions">
|
|
457
|
-
<button class="toolbar-action-btn" onclick="refreshMultiCliToolbar()" title="${t('multiCli.toolbar.refresh') || 'Refresh'}">
|
|
458
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
459
|
-
</button>
|
|
460
|
-
<button class="toolbar-action-btn" onclick="exportMultiCliPlanJson()" title="${t('multiCli.toolbar.export') || 'Export JSON'}">
|
|
461
|
-
<i data-lucide="download" class="w-4 h-4"></i>
|
|
462
|
-
</button>
|
|
463
|
-
<button class="toolbar-action-btn" onclick="viewMultiCliRawJson()" title="${t('multiCli.toolbar.viewRaw') || 'View Raw Data'}">
|
|
464
|
-
<i data-lucide="code" class="w-4 h-4"></i>
|
|
465
|
-
</button>
|
|
466
|
-
</div>
|
|
467
|
-
`;
|
|
468
|
-
|
|
469
|
-
// Task List
|
|
470
|
-
if (tasks.length > 0) {
|
|
471
|
-
toolbarHtml += `
|
|
472
|
-
<div class="toolbar-task-list">
|
|
473
|
-
${tasks.map((task, idx) => {
|
|
474
|
-
const taskTitle = task.title || task.name || task.summary || `Task ${idx + 1}`;
|
|
475
|
-
const taskScope = task.meta?.scope || task.scope || '';
|
|
476
|
-
const taskIdValue = task.id || `T${idx + 1}`;
|
|
477
|
-
|
|
478
|
-
return `
|
|
479
|
-
<div class="toolbar-task-item" onclick="openToolbarTaskDrawer('${escapeHtml(session.id)}', '${escapeHtml(taskIdValue)}')" data-task-idx="${idx}">
|
|
480
|
-
<span class="toolbar-task-num">#${idx + 1}</span>
|
|
481
|
-
<div class="toolbar-task-info">
|
|
482
|
-
<span class="toolbar-task-title" title="${escapeHtml(taskTitle)}">${escapeHtml(taskTitle)}</span>
|
|
483
|
-
${taskScope ? `<span class="toolbar-task-scope">${escapeHtml(taskScope)}</span>` : ''}
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
`;
|
|
487
|
-
}).join('')}
|
|
488
|
-
</div>
|
|
489
|
-
`;
|
|
490
|
-
} else {
|
|
491
|
-
toolbarHtml += `
|
|
492
|
-
<div class="toolbar-empty">
|
|
493
|
-
<i data-lucide="inbox" class="w-8 h-8"></i>
|
|
494
|
-
<span>${t('multiCli.toolbar.noTasks') || 'No tasks available'}</span>
|
|
495
|
-
</div>
|
|
496
|
-
`;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
// Session Info
|
|
500
|
-
toolbarHtml += `
|
|
501
|
-
<div class="toolbar-session-info">
|
|
502
|
-
<div class="toolbar-info-item">
|
|
503
|
-
<span class="toolbar-info-label">${t('multiCli.toolbar.sessionId') || 'Session'}</span>
|
|
504
|
-
<span class="toolbar-info-value" title="${escapeHtml(session.id)}">${escapeHtml(session.id)}</span>
|
|
505
|
-
</div>
|
|
506
|
-
${plan?.summary ? `
|
|
507
|
-
<div class="toolbar-info-item">
|
|
508
|
-
<span class="toolbar-info-label">${t('multiCli.toolbar.summary') || 'Summary'}</span>
|
|
509
|
-
<span class="toolbar-info-value toolbar-summary" title="${escapeHtml(plan.summary)}">${escapeHtml(plan.summary)}</span>
|
|
510
|
-
</div>
|
|
511
|
-
` : ''}
|
|
512
|
-
</div>
|
|
513
|
-
`;
|
|
514
|
-
|
|
515
|
-
return toolbarHtml;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Scroll to a specific task in the planning tab
|
|
520
|
-
*/
|
|
521
|
-
function scrollToMultiCliTask(taskIdx) {
|
|
522
|
-
// Switch to planning tab if not active
|
|
523
|
-
const planningTab = document.querySelector('.detail-tab[data-tab="planning"]');
|
|
524
|
-
if (planningTab && !planningTab.classList.contains('active')) {
|
|
525
|
-
switchMultiCliDetailTab('planning');
|
|
526
|
-
// Wait for tab content to render
|
|
527
|
-
setTimeout(() => scrollToTaskElement(taskIdx), 100);
|
|
528
|
-
} else {
|
|
529
|
-
scrollToTaskElement(taskIdx);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Open task drawer from toolbar (wrapper for openTaskDrawerForMultiCli)
|
|
535
|
-
*/
|
|
536
|
-
function openToolbarTaskDrawer(sessionId, taskId) {
|
|
537
|
-
openTaskDrawerForMultiCli(sessionId, taskId);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Scroll to task element in the DOM
|
|
542
|
-
*/
|
|
543
|
-
function scrollToTaskElement(taskIdx) {
|
|
544
|
-
const taskItems = document.querySelectorAll('.fix-task-summary-item');
|
|
545
|
-
if (taskItems[taskIdx]) {
|
|
546
|
-
taskItems[taskIdx].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
547
|
-
// Highlight the task briefly
|
|
548
|
-
taskItems[taskIdx].classList.add('toolbar-highlight');
|
|
549
|
-
setTimeout(() => {
|
|
550
|
-
taskItems[taskIdx].classList.remove('toolbar-highlight');
|
|
551
|
-
}, 2000);
|
|
552
|
-
// Expand the collapsible if collapsed
|
|
553
|
-
const header = taskItems[taskIdx].querySelector('.collapsible-header');
|
|
554
|
-
const content = taskItems[taskIdx].querySelector('.collapsible-content');
|
|
555
|
-
if (header && content && content.classList.contains('collapsed')) {
|
|
556
|
-
header.click();
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Refresh the toolbar content
|
|
563
|
-
*/
|
|
564
|
-
function refreshMultiCliToolbar() {
|
|
565
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
566
|
-
if (!session) return;
|
|
567
|
-
|
|
568
|
-
const toolbarContent = document.querySelector('.toolbar-content');
|
|
569
|
-
if (toolbarContent) {
|
|
570
|
-
toolbarContent.innerHTML = renderMultiCliToolbar(session);
|
|
571
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Export plan.json content
|
|
577
|
-
*/
|
|
578
|
-
function exportMultiCliPlanJson() {
|
|
579
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
580
|
-
if (!session || !session.plan) {
|
|
581
|
-
if (typeof showRefreshToast === 'function') {
|
|
582
|
-
showRefreshToast(t('multiCli.toolbar.noPlan') || 'No plan data available', 'warning');
|
|
583
|
-
}
|
|
584
|
-
return;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
const jsonStr = JSON.stringify(session.plan, null, 2);
|
|
588
|
-
const blob = new Blob([jsonStr], { type: 'application/json' });
|
|
589
|
-
const url = URL.createObjectURL(blob);
|
|
590
|
-
const a = document.createElement('a');
|
|
591
|
-
a.href = url;
|
|
592
|
-
a.download = `plan-${session.id}.json`;
|
|
593
|
-
document.body.appendChild(a);
|
|
594
|
-
a.click();
|
|
595
|
-
document.body.removeChild(a);
|
|
596
|
-
URL.revokeObjectURL(url);
|
|
597
|
-
|
|
598
|
-
if (typeof showRefreshToast === 'function') {
|
|
599
|
-
showRefreshToast(t('multiCli.toolbar.exported') || 'Plan exported successfully', 'success');
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* View raw session JSON in modal
|
|
605
|
-
*/
|
|
606
|
-
function viewMultiCliRawJson() {
|
|
607
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
608
|
-
if (!session) return;
|
|
609
|
-
|
|
610
|
-
// Reuse existing JSON modal pattern
|
|
611
|
-
const overlay = document.createElement('div');
|
|
612
|
-
overlay.className = 'json-modal-overlay active';
|
|
613
|
-
overlay.innerHTML = `
|
|
614
|
-
<div class="json-modal">
|
|
615
|
-
<div class="json-modal-header">
|
|
616
|
-
<div class="json-modal-title">
|
|
617
|
-
<span class="session-id-badge">${escapeHtml(session.id)}</span>
|
|
618
|
-
<span>${t('multiCli.toolbar.rawData') || 'Raw Session Data'}</span>
|
|
619
|
-
</div>
|
|
620
|
-
<button class="json-modal-close" onclick="closeJsonModal(this)">×</button>
|
|
621
|
-
</div>
|
|
622
|
-
<div class="json-modal-body">
|
|
623
|
-
<pre class="json-modal-content">${escapeHtml(JSON.stringify(session, null, 2))}</pre>
|
|
624
|
-
</div>
|
|
625
|
-
<div class="json-modal-footer">
|
|
626
|
-
<button class="btn-copy-json" onclick="copyJsonToClipboard(this)">${t('action.copy') || 'Copy to Clipboard'}</button>
|
|
627
|
-
</div>
|
|
628
|
-
</div>
|
|
629
|
-
`;
|
|
630
|
-
document.body.appendChild(overlay);
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* Switch between multi-cli detail tabs
|
|
635
|
-
*/
|
|
636
|
-
function switchMultiCliDetailTab(tabName) {
|
|
637
|
-
// Update active tab
|
|
638
|
-
document.querySelectorAll('.detail-tab').forEach(tab => {
|
|
639
|
-
tab.classList.toggle('active', tab.dataset.tab === tabName);
|
|
640
|
-
});
|
|
641
|
-
|
|
642
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
643
|
-
if (!session) return;
|
|
644
|
-
|
|
645
|
-
const contentArea = document.getElementById('multiCliDetailTabContent');
|
|
646
|
-
|
|
647
|
-
switch (tabName) {
|
|
648
|
-
case 'tasks':
|
|
649
|
-
contentArea.innerHTML = renderMultiCliTasksTab(session);
|
|
650
|
-
break;
|
|
651
|
-
case 'discussion':
|
|
652
|
-
contentArea.innerHTML = renderMultiCliDiscussionSection(session);
|
|
653
|
-
break;
|
|
654
|
-
case 'context':
|
|
655
|
-
loadAndRenderMultiCliContextTab(session, contentArea);
|
|
656
|
-
contentArea.classList.add('active');
|
|
657
|
-
return; // Early return as this is async
|
|
658
|
-
case 'summary':
|
|
659
|
-
loadAndRenderMultiCliSummaryTab(session, contentArea);
|
|
660
|
-
contentArea.classList.add('active');
|
|
661
|
-
return; // Early return as this is async
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
// Add active class to show content
|
|
665
|
-
contentArea.classList.add('active');
|
|
666
|
-
|
|
667
|
-
// Re-initialize after tab switch
|
|
668
|
-
setTimeout(() => {
|
|
669
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
670
|
-
initCollapsibleSections(contentArea);
|
|
671
|
-
// Initialize task click handlers for tasks tab
|
|
672
|
-
if (tabName === 'tasks') {
|
|
673
|
-
initMultiCliTaskClickHandlers();
|
|
674
|
-
}
|
|
675
|
-
}, 50);
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
// ============================================
|
|
679
|
-
// MULTI-CLI TAB RENDERERS
|
|
680
|
-
// ============================================
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Render Tasks tab - displays plan summary + tasks (same style as lite-plan)
|
|
684
|
-
* Uses session.tasks (normalized tasks) with fallback to session.plan.tasks
|
|
685
|
-
*/
|
|
686
|
-
function renderMultiCliTasksTab(session) {
|
|
687
|
-
const plan = session.plan || {};
|
|
688
|
-
// Use session.tasks (normalized from backend) with fallback to plan.tasks
|
|
689
|
-
const tasks = session.tasks?.length > 0 ? session.tasks : (plan.tasks || []);
|
|
690
|
-
|
|
691
|
-
// Populate drawer tasks for click-to-open functionality
|
|
692
|
-
currentDrawerTasks = tasks;
|
|
693
|
-
|
|
694
|
-
let sections = [];
|
|
695
|
-
|
|
696
|
-
// Extract plan info from multiple sources (plan.json, synthesis, or session)
|
|
697
|
-
// plan.json: task_description, solution.name, execution_flow
|
|
698
|
-
// synthesis: solutions[].summary, solutions[].implementation_plan.approach
|
|
699
|
-
const taskDescription = plan.task_description || session.topicTitle || '';
|
|
700
|
-
const solutionName = plan.solution?.name || (plan.solutions?.[0]?.name) || '';
|
|
701
|
-
const solutionSummary = plan.solutions?.[0]?.summary || '';
|
|
702
|
-
const approach = plan.solutions?.[0]?.implementation_plan?.approach || plan.execution_flow || '';
|
|
703
|
-
const feasibility = plan.solution?.feasibility || plan.solutions?.[0]?.feasibility;
|
|
704
|
-
const effort = plan.solution?.effort || plan.solutions?.[0]?.effort || '';
|
|
705
|
-
const risk = plan.solution?.risk || plan.solutions?.[0]?.risk || '';
|
|
706
|
-
|
|
707
|
-
// Plan Summary Section (if any info available)
|
|
708
|
-
const hasInfo = taskDescription || solutionName || solutionSummary || approach || plan.summary;
|
|
709
|
-
if (hasInfo) {
|
|
710
|
-
let planInfo = [];
|
|
711
|
-
|
|
712
|
-
// Task description (main objective)
|
|
713
|
-
if (taskDescription) {
|
|
714
|
-
planInfo.push(`<p class="plan-summary-text"><strong>${t('multiCli.plan.objective')}:</strong> ${escapeHtml(taskDescription)}</p>`);
|
|
715
|
-
}
|
|
716
|
-
// Solution name and summary
|
|
717
|
-
if (solutionName) {
|
|
718
|
-
planInfo.push(`<p class="plan-solution-text"><strong>${t('multiCli.plan.solution')}:</strong> ${escapeHtml(solutionName)}</p>`);
|
|
719
|
-
}
|
|
720
|
-
if (solutionSummary) {
|
|
721
|
-
planInfo.push(`<p class="plan-summary-text">${escapeHtml(solutionSummary)}</p>`);
|
|
722
|
-
}
|
|
723
|
-
// Legacy summary field
|
|
724
|
-
if (plan.summary && !taskDescription && !solutionSummary) {
|
|
725
|
-
planInfo.push(`<p class="plan-summary-text">${escapeHtml(plan.summary)}</p>`);
|
|
726
|
-
}
|
|
727
|
-
// Approach/execution flow
|
|
728
|
-
if (approach) {
|
|
729
|
-
planInfo.push(`<p class="plan-approach-text"><strong>${t('multiCli.plan.approach')}:</strong> ${escapeHtml(approach)}</p>`);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
// Metadata badges - concise format
|
|
733
|
-
let metaBadges = [];
|
|
734
|
-
if (feasibility) metaBadges.push(`<span class="meta-badge feasibility">${Math.round(feasibility * 100)}%</span>`);
|
|
735
|
-
if (effort) metaBadges.push(`<span class="meta-badge effort ${escapeHtml(effort)}">${escapeHtml(effort)}</span>`);
|
|
736
|
-
if (risk) metaBadges.push(`<span class="meta-badge risk ${escapeHtml(risk)}">${escapeHtml(risk)} ${t('multiCli.plan.risk')}</span>`);
|
|
737
|
-
// Legacy badges
|
|
738
|
-
if (plan.severity) metaBadges.push(`<span class="meta-badge severity ${escapeHtml(plan.severity)}">${escapeHtml(plan.severity)}</span>`);
|
|
739
|
-
if (plan.complexity) metaBadges.push(`<span class="meta-badge complexity">${escapeHtml(plan.complexity)}</span>`);
|
|
740
|
-
if (plan.estimated_time) metaBadges.push(`<span class="meta-badge time">${escapeHtml(plan.estimated_time)}</span>`);
|
|
741
|
-
|
|
742
|
-
sections.push(`
|
|
743
|
-
<div class="plan-summary-section">
|
|
744
|
-
${planInfo.join('')}
|
|
745
|
-
${metaBadges.length ? `<div class="plan-meta-badges">${metaBadges.join(' ')}</div>` : ''}
|
|
746
|
-
</div>
|
|
747
|
-
`);
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Tasks Section
|
|
751
|
-
if (tasks.length === 0) {
|
|
752
|
-
sections.push(`
|
|
753
|
-
<div class="tab-empty-state">
|
|
754
|
-
<div class="empty-icon"><i data-lucide="clipboard-list" class="w-12 h-12"></i></div>
|
|
755
|
-
<div class="empty-title">${t('empty.noTasks') || 'No Tasks'}</div>
|
|
756
|
-
<div class="empty-text">${t('empty.noTasksText') || 'No tasks available for this session.'}</div>
|
|
757
|
-
</div>
|
|
758
|
-
`);
|
|
759
|
-
} else {
|
|
760
|
-
sections.push(`
|
|
761
|
-
<div class="tasks-list" id="multiCliTasksListContent">
|
|
762
|
-
${tasks.map((task, idx) => renderMultiCliTaskItem(session.id, task, idx)).join('')}
|
|
763
|
-
</div>
|
|
764
|
-
`);
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
return `<div class="tasks-tab-content">${sections.join('')}</div>`;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Render Plan tab - displays plan.json content (summary, approach, metadata)
|
|
772
|
-
*/
|
|
773
|
-
function renderMultiCliPlanTab(session) {
|
|
774
|
-
const plan = session.plan;
|
|
775
|
-
|
|
776
|
-
if (!plan) {
|
|
777
|
-
return `
|
|
778
|
-
<div class="tab-empty-state">
|
|
779
|
-
<div class="empty-icon"><i data-lucide="ruler" class="w-12 h-12"></i></div>
|
|
780
|
-
<div class="empty-title">${t('multiCli.empty.planning') || 'No Plan Data'}</div>
|
|
781
|
-
<div class="empty-text">${t('multiCli.empty.planningText') || 'No plan.json found for this session.'}</div>
|
|
782
|
-
</div>
|
|
783
|
-
`;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
return `
|
|
787
|
-
<div class="plan-tab-content">
|
|
788
|
-
<!-- Summary -->
|
|
789
|
-
${plan.summary ? `
|
|
790
|
-
<div class="plan-section">
|
|
791
|
-
<h4 class="plan-section-title"><i data-lucide="clipboard-list" class="w-4 h-4 inline mr-1"></i> Summary</h4>
|
|
792
|
-
<p class="plan-summary-text">${escapeHtml(plan.summary)}</p>
|
|
793
|
-
</div>
|
|
794
|
-
` : ''}
|
|
795
|
-
|
|
796
|
-
<!-- Root Cause (fix-plan specific) -->
|
|
797
|
-
${plan.root_cause ? `
|
|
798
|
-
<div class="plan-section">
|
|
799
|
-
<h4 class="plan-section-title"><i data-lucide="search" class="w-4 h-4 inline mr-1"></i> Root Cause</h4>
|
|
800
|
-
<p class="plan-root-cause-text">${escapeHtml(plan.root_cause)}</p>
|
|
801
|
-
</div>
|
|
802
|
-
` : ''}
|
|
803
|
-
|
|
804
|
-
<!-- Strategy (fix-plan specific) -->
|
|
805
|
-
${plan.strategy ? `
|
|
806
|
-
<div class="plan-section">
|
|
807
|
-
<h4 class="plan-section-title"><i data-lucide="route" class="w-4 h-4 inline mr-1"></i> Fix Strategy</h4>
|
|
808
|
-
<p class="plan-strategy-text">${escapeHtml(plan.strategy)}</p>
|
|
809
|
-
</div>
|
|
810
|
-
` : ''}
|
|
811
|
-
|
|
812
|
-
<!-- Approach -->
|
|
813
|
-
${plan.approach ? `
|
|
814
|
-
<div class="plan-section">
|
|
815
|
-
<h4 class="plan-section-title"><i data-lucide="target" class="w-4 h-4 inline mr-1"></i> Approach</h4>
|
|
816
|
-
<p class="plan-approach-text">${escapeHtml(plan.approach)}</p>
|
|
817
|
-
</div>
|
|
818
|
-
` : ''}
|
|
819
|
-
|
|
820
|
-
<!-- User Requirements -->
|
|
821
|
-
${plan.user_requirements ? `
|
|
822
|
-
<div class="plan-section">
|
|
823
|
-
<h4 class="plan-section-title"><i data-lucide="user" class="w-4 h-4 inline mr-1"></i> User Requirements</h4>
|
|
824
|
-
<p class="plan-requirements-text">${escapeHtml(plan.user_requirements)}</p>
|
|
825
|
-
</div>
|
|
826
|
-
` : ''}
|
|
827
|
-
|
|
828
|
-
<!-- Focus Paths -->
|
|
829
|
-
${plan.focus_paths?.length ? `
|
|
830
|
-
<div class="plan-section">
|
|
831
|
-
<h4 class="plan-section-title"><i data-lucide="folder" class="w-4 h-4 inline mr-1"></i> Focus Paths</h4>
|
|
832
|
-
<div class="path-tags">
|
|
833
|
-
${plan.focus_paths.map(p => `<span class="path-tag">${escapeHtml(p)}</span>`).join('')}
|
|
834
|
-
</div>
|
|
835
|
-
</div>
|
|
836
|
-
` : ''}
|
|
837
|
-
|
|
838
|
-
<!-- Metadata -->
|
|
839
|
-
<div class="plan-section">
|
|
840
|
-
<h4 class="plan-section-title"><i data-lucide="info" class="w-4 h-4 inline mr-1"></i> Metadata</h4>
|
|
841
|
-
<div class="plan-meta-grid">
|
|
842
|
-
${plan.severity ? `<div class="meta-item"><span class="meta-label">Severity:</span> <span class="severity-badge ${escapeHtml(plan.severity)}">${escapeHtml(plan.severity)}</span></div>` : ''}
|
|
843
|
-
${plan.risk_level ? `<div class="meta-item"><span class="meta-label">Risk Level:</span> <span class="risk-badge ${escapeHtml(plan.risk_level)}">${escapeHtml(plan.risk_level)}</span></div>` : ''}
|
|
844
|
-
${plan.estimated_time ? `<div class="meta-item"><span class="meta-label">Estimated Time:</span> ${escapeHtml(plan.estimated_time)}</div>` : ''}
|
|
845
|
-
${plan.complexity ? `<div class="meta-item"><span class="meta-label">Complexity:</span> ${escapeHtml(plan.complexity)}</div>` : ''}
|
|
846
|
-
${plan.recommended_execution ? `<div class="meta-item"><span class="meta-label">Execution:</span> ${escapeHtml(plan.recommended_execution)}</div>` : ''}
|
|
847
|
-
</div>
|
|
848
|
-
</div>
|
|
849
|
-
|
|
850
|
-
<!-- Raw JSON -->
|
|
851
|
-
<div class="plan-section collapsible-section">
|
|
852
|
-
<div class="collapsible-header">
|
|
853
|
-
<span class="collapse-icon">▶</span>
|
|
854
|
-
<span class="section-label">{ } Raw JSON</span>
|
|
855
|
-
</div>
|
|
856
|
-
<div class="collapsible-content collapsed">
|
|
857
|
-
<pre class="json-content">${escapeHtml(JSON.stringify(plan, null, 2))}</pre>
|
|
858
|
-
</div>
|
|
859
|
-
</div>
|
|
860
|
-
</div>
|
|
861
|
-
`;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
/**
|
|
865
|
-
* Load and render Context tab - displays context-package content
|
|
866
|
-
*/
|
|
867
|
-
async function loadAndRenderMultiCliContextTab(session, contentArea) {
|
|
868
|
-
contentArea.innerHTML = `<div class="tab-loading">${t('common.loading') || 'Loading...'}</div>`;
|
|
869
|
-
|
|
870
|
-
try {
|
|
871
|
-
if (window.SERVER_MODE && session.path) {
|
|
872
|
-
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=context`);
|
|
873
|
-
if (response.ok) {
|
|
874
|
-
const data = await response.json();
|
|
875
|
-
contentArea.innerHTML = renderMultiCliContextContent(data.context, session);
|
|
876
|
-
initCollapsibleSections(contentArea);
|
|
877
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
878
|
-
return;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
// Fallback: show session context_package if available
|
|
882
|
-
contentArea.innerHTML = renderMultiCliContextContent(session.context_package, session);
|
|
883
|
-
initCollapsibleSections(contentArea);
|
|
884
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
885
|
-
} catch (err) {
|
|
886
|
-
contentArea.innerHTML = `<div class="tab-error">Failed to load context: ${err.message}</div>`;
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* Render context content for multi-cli
|
|
892
|
-
*/
|
|
893
|
-
function renderMultiCliContextContent(context, session) {
|
|
894
|
-
// Also check for context_package in session
|
|
895
|
-
const ctx = context || session.context_package || {};
|
|
896
|
-
|
|
897
|
-
if (!ctx || Object.keys(ctx).length === 0) {
|
|
898
|
-
return `
|
|
899
|
-
<div class="tab-empty-state">
|
|
900
|
-
<div class="empty-icon"><i data-lucide="package" class="w-12 h-12"></i></div>
|
|
901
|
-
<div class="empty-title">${t('empty.noContext') || 'No Context Data'}</div>
|
|
902
|
-
<div class="empty-text">${t('empty.noContextText') || 'No context package available for this session.'}</div>
|
|
903
|
-
</div>
|
|
904
|
-
`;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
let sections = [];
|
|
908
|
-
|
|
909
|
-
// Task Description
|
|
910
|
-
if (ctx.task_description) {
|
|
911
|
-
sections.push(`
|
|
912
|
-
<div class="context-section">
|
|
913
|
-
<h4 class="context-section-title"><i data-lucide="file-text" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.taskDescription')}</h4>
|
|
914
|
-
<p class="context-description">${escapeHtml(ctx.task_description)}</p>
|
|
915
|
-
</div>
|
|
916
|
-
`);
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
// Constraints
|
|
920
|
-
if (ctx.constraints?.length) {
|
|
921
|
-
sections.push(`
|
|
922
|
-
<div class="context-section">
|
|
923
|
-
<h4 class="context-section-title"><i data-lucide="alert-triangle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.constraints')}</h4>
|
|
924
|
-
<ul class="constraints-list">
|
|
925
|
-
${ctx.constraints.map(c => `<li>${escapeHtml(c)}</li>`).join('')}
|
|
926
|
-
</ul>
|
|
927
|
-
</div>
|
|
928
|
-
`);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
// Focus Paths
|
|
932
|
-
if (ctx.focus_paths?.length) {
|
|
933
|
-
sections.push(`
|
|
934
|
-
<div class="context-section">
|
|
935
|
-
<h4 class="context-section-title"><i data-lucide="folder" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.focusPaths')}</h4>
|
|
936
|
-
<div class="path-tags">
|
|
937
|
-
${ctx.focus_paths.map(p => `<span class="path-tag">${escapeHtml(p)}</span>`).join('')}
|
|
938
|
-
</div>
|
|
939
|
-
</div>
|
|
940
|
-
`);
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
// Relevant Files
|
|
944
|
-
if (ctx.relevant_files?.length) {
|
|
945
|
-
sections.push(`
|
|
946
|
-
<div class="context-section collapsible-section">
|
|
947
|
-
<div class="collapsible-header">
|
|
948
|
-
<span class="collapse-icon">▶</span>
|
|
949
|
-
<span class="section-label"><i data-lucide="files" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.relevantFiles')} (${ctx.relevant_files.length})</span>
|
|
950
|
-
</div>
|
|
951
|
-
<div class="collapsible-content collapsed">
|
|
952
|
-
<ul class="files-list">
|
|
953
|
-
${ctx.relevant_files.map(f => `
|
|
954
|
-
<li class="file-item">
|
|
955
|
-
<span class="file-icon">📄</span>
|
|
956
|
-
<code>${escapeHtml(typeof f === 'string' ? f : f.path || f.file || '')}</code>
|
|
957
|
-
${f.reason ? `<span class="file-reason">${escapeHtml(f.reason)}</span>` : ''}
|
|
958
|
-
</li>
|
|
959
|
-
`).join('')}
|
|
960
|
-
</ul>
|
|
961
|
-
</div>
|
|
962
|
-
</div>
|
|
963
|
-
`);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
// Dependencies
|
|
967
|
-
if (ctx.dependencies?.length) {
|
|
968
|
-
sections.push(`
|
|
969
|
-
<div class="context-section collapsible-section">
|
|
970
|
-
<div class="collapsible-header">
|
|
971
|
-
<span class="collapse-icon">▶</span>
|
|
972
|
-
<span class="section-label"><i data-lucide="git-branch" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.dependencies')} (${ctx.dependencies.length})</span>
|
|
973
|
-
</div>
|
|
974
|
-
<div class="collapsible-content collapsed">
|
|
975
|
-
<ul class="deps-list">
|
|
976
|
-
${ctx.dependencies.map(d => `<li>${escapeHtml(typeof d === 'string' ? d : d.name || JSON.stringify(d))}</li>`).join('')}
|
|
977
|
-
</ul>
|
|
978
|
-
</div>
|
|
979
|
-
</div>
|
|
980
|
-
`);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
// Conflict Risks
|
|
984
|
-
if (ctx.conflict_risks?.length) {
|
|
985
|
-
sections.push(`
|
|
986
|
-
<div class="context-section">
|
|
987
|
-
<h4 class="context-section-title"><i data-lucide="alert-circle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.conflictRisks')}</h4>
|
|
988
|
-
<ul class="risks-list">
|
|
989
|
-
${ctx.conflict_risks.map(r => `<li class="risk-item">${escapeHtml(typeof r === 'string' ? r : r.description || JSON.stringify(r))}</li>`).join('')}
|
|
990
|
-
</ul>
|
|
991
|
-
</div>
|
|
992
|
-
`);
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// Session ID
|
|
996
|
-
if (ctx.session_id) {
|
|
997
|
-
sections.push(`
|
|
998
|
-
<div class="context-section">
|
|
999
|
-
<h4 class="context-section-title"><i data-lucide="hash" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.context.sessionId')}</h4>
|
|
1000
|
-
<code class="session-id-code">${escapeHtml(ctx.session_id)}</code>
|
|
1001
|
-
</div>
|
|
1002
|
-
`);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
// Raw JSON
|
|
1006
|
-
sections.push(`
|
|
1007
|
-
<div class="context-section collapsible-section">
|
|
1008
|
-
<div class="collapsible-header">
|
|
1009
|
-
<span class="collapse-icon">▶</span>
|
|
1010
|
-
<span class="section-label">{ } ${t('multiCli.context.rawJson')}</span>
|
|
1011
|
-
</div>
|
|
1012
|
-
<div class="collapsible-content collapsed">
|
|
1013
|
-
<pre class="json-content">${escapeHtml(JSON.stringify(ctx, null, 2))}</pre>
|
|
1014
|
-
</div>
|
|
1015
|
-
</div>
|
|
1016
|
-
`);
|
|
1017
|
-
|
|
1018
|
-
return `<div class="context-tab-content">${sections.join('')}</div>`;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* Load and render Summary tab
|
|
1023
|
-
*/
|
|
1024
|
-
async function loadAndRenderMultiCliSummaryTab(session, contentArea) {
|
|
1025
|
-
contentArea.innerHTML = `<div class="tab-loading">${t('common.loading') || 'Loading...'}</div>`;
|
|
1026
|
-
|
|
1027
|
-
try {
|
|
1028
|
-
if (window.SERVER_MODE && session.path) {
|
|
1029
|
-
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=summary`);
|
|
1030
|
-
if (response.ok) {
|
|
1031
|
-
const data = await response.json();
|
|
1032
|
-
// Support both summaries (from .summaries/) and summary (from plan.json)
|
|
1033
|
-
const summaryText = data.summary || (data.summaries?.length ? data.summaries[0].content : null);
|
|
1034
|
-
contentArea.innerHTML = renderMultiCliSummaryContent(summaryText, session);
|
|
1035
|
-
initCollapsibleSections(contentArea);
|
|
1036
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
// Fallback: show synthesis summary
|
|
1041
|
-
contentArea.innerHTML = renderMultiCliSummaryContent(null, session);
|
|
1042
|
-
initCollapsibleSections(contentArea);
|
|
1043
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1044
|
-
} catch (err) {
|
|
1045
|
-
contentArea.innerHTML = `<div class="tab-error">Failed to load summary: ${err.message}</div>`;
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* Render summary content for multi-cli
|
|
1051
|
-
*/
|
|
1052
|
-
function renderMultiCliSummaryContent(summary, session) {
|
|
1053
|
-
const synthesis = session.latestSynthesis || session.discussionTopic || {};
|
|
1054
|
-
const plan = session.plan || {};
|
|
1055
|
-
|
|
1056
|
-
// Use summary from file or build from synthesis
|
|
1057
|
-
const summaryText = summary || synthesis.convergence?.summary || plan.summary;
|
|
1058
|
-
|
|
1059
|
-
if (!summaryText && !synthesis.solutions?.length) {
|
|
1060
|
-
return `
|
|
1061
|
-
<div class="tab-empty-state">
|
|
1062
|
-
<div class="empty-icon"><i data-lucide="file-text" class="w-12 h-12"></i></div>
|
|
1063
|
-
<div class="empty-title">${t('empty.noSummary') || 'No Summary'}</div>
|
|
1064
|
-
<div class="empty-text">${t('empty.noSummaryText') || 'No summary available for this session.'}</div>
|
|
1065
|
-
</div>
|
|
1066
|
-
`;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
let sections = [];
|
|
1070
|
-
|
|
1071
|
-
// Main Summary
|
|
1072
|
-
if (summaryText) {
|
|
1073
|
-
const summaryContent = typeof summaryText === 'string' ? summaryText : getI18nText(summaryText);
|
|
1074
|
-
sections.push(`
|
|
1075
|
-
<div class="summary-section">
|
|
1076
|
-
<h4 class="summary-section-title"><i data-lucide="file-text" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.summary.title')}</h4>
|
|
1077
|
-
<div class="summary-content">${escapeHtml(summaryContent)}</div>
|
|
1078
|
-
</div>
|
|
1079
|
-
`);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
// Convergence Status
|
|
1083
|
-
if (synthesis.convergence) {
|
|
1084
|
-
const conv = synthesis.convergence;
|
|
1085
|
-
sections.push(`
|
|
1086
|
-
<div class="summary-section">
|
|
1087
|
-
<h4 class="summary-section-title"><i data-lucide="git-merge" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.summary.convergence')}</h4>
|
|
1088
|
-
<div class="convergence-info">
|
|
1089
|
-
<span class="convergence-level ${conv.level || ''}">${escapeHtml(conv.level || 'unknown')}</span>
|
|
1090
|
-
<span class="convergence-rec ${conv.recommendation || ''}">${escapeHtml(conv.recommendation || '')}</span>
|
|
1091
|
-
</div>
|
|
1092
|
-
</div>
|
|
1093
|
-
`);
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
// Solutions Summary
|
|
1097
|
-
if (synthesis.solutions?.length) {
|
|
1098
|
-
sections.push(`
|
|
1099
|
-
<div class="summary-section collapsible-section">
|
|
1100
|
-
<div class="collapsible-header">
|
|
1101
|
-
<span class="collapse-icon">▶</span>
|
|
1102
|
-
<span class="section-label"><i data-lucide="lightbulb" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.summary.solutions')} (${synthesis.solutions.length})</span>
|
|
1103
|
-
</div>
|
|
1104
|
-
<div class="collapsible-content collapsed">
|
|
1105
|
-
${synthesis.solutions.map((sol, idx) => {
|
|
1106
|
-
const name = getI18nText(sol.name) || sol.title || sol.id || `${t('multiCli.summary.solution')} ${idx + 1}`;
|
|
1107
|
-
const summary = getI18nText(sol.summary) || '';
|
|
1108
|
-
const feasibility = sol.feasibility?.score || sol.feasibility || 0;
|
|
1109
|
-
const effort = sol.effort || '';
|
|
1110
|
-
const risk = sol.risk || '';
|
|
1111
|
-
const pros = sol.pros || [];
|
|
1112
|
-
const cons = sol.cons || [];
|
|
1113
|
-
|
|
1114
|
-
return `
|
|
1115
|
-
<div class="solution-card">
|
|
1116
|
-
<div class="solution-header">
|
|
1117
|
-
<div class="solution-title-row">
|
|
1118
|
-
<span class="solution-num">#${idx + 1}</span>
|
|
1119
|
-
<span class="solution-name">${escapeHtml(name)}</span>
|
|
1120
|
-
</div>
|
|
1121
|
-
<div class="solution-badges">
|
|
1122
|
-
${feasibility ? `<span class="badge feasibility">${Math.round(feasibility * 100)}%</span>` : ''}
|
|
1123
|
-
${effort ? `<span class="badge effort ${escapeHtml(effort)}">${escapeHtml(effort)}</span>` : ''}
|
|
1124
|
-
${risk ? `<span class="badge risk ${escapeHtml(risk)}">${escapeHtml(risk)}</span>` : ''}
|
|
1125
|
-
</div>
|
|
1126
|
-
</div>
|
|
1127
|
-
${summary ? `
|
|
1128
|
-
<div class="solution-summary">
|
|
1129
|
-
<p>${escapeHtml(summary)}</p>
|
|
1130
|
-
</div>
|
|
1131
|
-
` : ''}
|
|
1132
|
-
${pros.length > 0 ? `
|
|
1133
|
-
<div class="solution-details">
|
|
1134
|
-
<h5 class="details-label">✓ ${t('multiCli.summary.pros') || 'Pros'}:</h5>
|
|
1135
|
-
<ul class="details-list">
|
|
1136
|
-
${pros.map(p => `<li>${escapeHtml(getI18nText(p) || p)}</li>`).join('')}
|
|
1137
|
-
</ul>
|
|
1138
|
-
</div>
|
|
1139
|
-
` : ''}
|
|
1140
|
-
${cons.length > 0 ? `
|
|
1141
|
-
<div class="solution-details">
|
|
1142
|
-
<h5 class="details-label">✗ ${t('multiCli.summary.cons') || 'Cons'}:</h5>
|
|
1143
|
-
<ul class="details-list">
|
|
1144
|
-
${cons.map(c => `<li>${escapeHtml(getI18nText(c) || c)}</li>`).join('')}
|
|
1145
|
-
</ul>
|
|
1146
|
-
</div>
|
|
1147
|
-
` : ''}
|
|
1148
|
-
</div>
|
|
1149
|
-
`;
|
|
1150
|
-
}).join('')}
|
|
1151
|
-
</div>
|
|
1152
|
-
</div>
|
|
1153
|
-
`);
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
return `<div class="summary-tab-content">${sections.join('')}</div>`;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Render Discussion Topic tab
|
|
1161
|
-
* Shows: title, description, scope, keyQuestions, status, tags
|
|
1162
|
-
*/
|
|
1163
|
-
function renderMultiCliTopicTab(session) {
|
|
1164
|
-
const topic = session.discussionTopic || session.latestSynthesis?.discussionTopic || {};
|
|
1165
|
-
|
|
1166
|
-
if (!topic || Object.keys(topic).length === 0) {
|
|
1167
|
-
return `
|
|
1168
|
-
<div class="tab-empty-state">
|
|
1169
|
-
<div class="empty-icon"><i data-lucide="message-circle" class="w-12 h-12"></i></div>
|
|
1170
|
-
<div class="empty-title">${t('multiCli.empty.topic') || 'No Discussion Topic'}</div>
|
|
1171
|
-
<div class="empty-text">${t('multiCli.empty.topicText') || 'No discussion topic data available for this session.'}</div>
|
|
1172
|
-
</div>
|
|
1173
|
-
`;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
const title = getI18nText(topic.title) || 'Untitled';
|
|
1177
|
-
const description = getI18nText(topic.description) || '';
|
|
1178
|
-
const scope = topic.scope || {};
|
|
1179
|
-
const keyQuestions = topic.keyQuestions || [];
|
|
1180
|
-
const status = topic.status || 'unknown';
|
|
1181
|
-
const tags = topic.tags || [];
|
|
1182
|
-
|
|
1183
|
-
let sections = [];
|
|
1184
|
-
|
|
1185
|
-
// Title and Description
|
|
1186
|
-
sections.push(`
|
|
1187
|
-
<div class="multi-cli-topic-section">
|
|
1188
|
-
<h3 class="multi-cli-topic-title">${escapeHtml(title)}</h3>
|
|
1189
|
-
${description ? `<p class="multi-cli-topic-description">${escapeHtml(description)}</p>` : ''}
|
|
1190
|
-
<div class="topic-meta">
|
|
1191
|
-
<span class="multi-cli-status ${status}">${escapeHtml(status)}</span>
|
|
1192
|
-
${tags.length ? tags.map(tag => `<span class="tag-badge">${escapeHtml(tag)}</span>`).join('') : ''}
|
|
1193
|
-
</div>
|
|
1194
|
-
</div>
|
|
1195
|
-
`);
|
|
1196
|
-
|
|
1197
|
-
// Scope (included/excluded)
|
|
1198
|
-
if (scope.included?.length || scope.excluded?.length) {
|
|
1199
|
-
sections.push(`
|
|
1200
|
-
<div class="multi-cli-section scope-section">
|
|
1201
|
-
<h4 class="section-title"><i data-lucide="target" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.scope') || 'Scope'}</h4>
|
|
1202
|
-
${scope.included?.length ? `
|
|
1203
|
-
<div class="scope-included">
|
|
1204
|
-
<strong>${t('multiCli.scope.included') || 'Included'}:</strong>
|
|
1205
|
-
<ul class="scope-list">
|
|
1206
|
-
${scope.included.map(item => `<li>${escapeHtml(getI18nText(item))}</li>`).join('')}
|
|
1207
|
-
</ul>
|
|
1208
|
-
</div>
|
|
1209
|
-
` : ''}
|
|
1210
|
-
${scope.excluded?.length ? `
|
|
1211
|
-
<div class="scope-excluded">
|
|
1212
|
-
<strong>${t('multiCli.scope.excluded') || 'Excluded'}:</strong>
|
|
1213
|
-
<ul class="scope-list excluded">
|
|
1214
|
-
${scope.excluded.map(item => `<li>${escapeHtml(getI18nText(item))}</li>`).join('')}
|
|
1215
|
-
</ul>
|
|
1216
|
-
</div>
|
|
1217
|
-
` : ''}
|
|
1218
|
-
</div>
|
|
1219
|
-
`);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
// Key Questions
|
|
1223
|
-
if (keyQuestions.length) {
|
|
1224
|
-
sections.push(`
|
|
1225
|
-
<div class="multi-cli-section questions-section">
|
|
1226
|
-
<h4 class="section-title"><i data-lucide="help-circle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.keyQuestions') || 'Key Questions'}</h4>
|
|
1227
|
-
<ol class="key-questions-list">
|
|
1228
|
-
${keyQuestions.map(q => `<li>${escapeHtml(getI18nText(q))}</li>`).join('')}
|
|
1229
|
-
</ol>
|
|
1230
|
-
</div>
|
|
1231
|
-
`);
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
return `<div class="multi-cli-topic-tab">${sections.join('')}</div>`;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* Render Related Files tab
|
|
1239
|
-
* Shows: fileTree, impactSummary
|
|
1240
|
-
*/
|
|
1241
|
-
function renderMultiCliFilesTab(session) {
|
|
1242
|
-
// Use helper to extract files from synthesis data structure
|
|
1243
|
-
const relatedFiles = extractFilesFromSynthesis(session.latestSynthesis);
|
|
1244
|
-
|
|
1245
|
-
if (!relatedFiles || (!relatedFiles.fileTree?.length && !relatedFiles.impactSummary?.length)) {
|
|
1246
|
-
return `
|
|
1247
|
-
<div class="tab-empty-state">
|
|
1248
|
-
<div class="empty-icon"><i data-lucide="folder-tree" class="w-12 h-12"></i></div>
|
|
1249
|
-
<div class="empty-title">${t('multiCli.empty.files') || 'No Related Files'}</div>
|
|
1250
|
-
<div class="empty-text">${t('multiCli.empty.filesText') || 'No file analysis data available for this session.'}</div>
|
|
1251
|
-
</div>
|
|
1252
|
-
`;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
const fileTree = relatedFiles.fileTree || [];
|
|
1256
|
-
const impactSummary = relatedFiles.impactSummary || [];
|
|
1257
|
-
const dependencyGraph = relatedFiles.dependencyGraph || [];
|
|
1258
|
-
|
|
1259
|
-
let sections = [];
|
|
1260
|
-
|
|
1261
|
-
// File Tree
|
|
1262
|
-
if (fileTree.length) {
|
|
1263
|
-
sections.push(`
|
|
1264
|
-
<div class="multi-cli-section file-tree-section collapsible-section">
|
|
1265
|
-
<div class="collapsible-header">
|
|
1266
|
-
<span class="collapse-icon">►</span>
|
|
1267
|
-
<span class="section-label"><i data-lucide="folder-tree" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.fileTree') || 'File Tree'} (${fileTree.length})</span>
|
|
1268
|
-
</div>
|
|
1269
|
-
<div class="collapsible-content collapsed">
|
|
1270
|
-
<div class="file-tree-list">
|
|
1271
|
-
${renderFileTreeNodes(fileTree)}
|
|
1272
|
-
</div>
|
|
1273
|
-
</div>
|
|
1274
|
-
</div>
|
|
1275
|
-
`);
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
// Impact Summary
|
|
1279
|
-
if (impactSummary.length) {
|
|
1280
|
-
sections.push(`
|
|
1281
|
-
<div class="multi-cli-section impact-section collapsible-section">
|
|
1282
|
-
<div class="collapsible-header">
|
|
1283
|
-
<span class="collapse-icon">►</span>
|
|
1284
|
-
<span class="section-label"><i data-lucide="alert-triangle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.impactSummary') || 'Impact Summary'} (${impactSummary.length})</span>
|
|
1285
|
-
</div>
|
|
1286
|
-
<div class="collapsible-content collapsed">
|
|
1287
|
-
<div class="impact-list">
|
|
1288
|
-
${impactSummary.map(impact => `
|
|
1289
|
-
<div class="impact-item impact-${impact.score || 'medium'}">
|
|
1290
|
-
<div class="impact-header">
|
|
1291
|
-
<code class="impact-file">${escapeHtml(impact.filePath || '')}</code>
|
|
1292
|
-
${impact.line ? `<span class="impact-line">:${impact.line}</span>` : ''}
|
|
1293
|
-
<span class="impact-score ${impact.score || 'medium'}">${escapeHtml(impact.score || 'medium')}</span>
|
|
1294
|
-
</div>
|
|
1295
|
-
${impact.reasoning ? `<div class="impact-reason">${escapeHtml(getI18nText(impact.reasoning))}</div>` : ''}
|
|
1296
|
-
</div>
|
|
1297
|
-
`).join('')}
|
|
1298
|
-
</div>
|
|
1299
|
-
</div>
|
|
1300
|
-
</div>
|
|
1301
|
-
`);
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
// Dependency Graph
|
|
1305
|
-
if (dependencyGraph.length) {
|
|
1306
|
-
sections.push(`
|
|
1307
|
-
<div class="multi-cli-section deps-section collapsible-section">
|
|
1308
|
-
<div class="collapsible-header">
|
|
1309
|
-
<span class="collapse-icon">►</span>
|
|
1310
|
-
<span class="section-label"><i data-lucide="git-branch" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.dependencies') || 'Dependencies'} (${dependencyGraph.length})</span>
|
|
1311
|
-
</div>
|
|
1312
|
-
<div class="collapsible-content collapsed">
|
|
1313
|
-
<div class="deps-list">
|
|
1314
|
-
${dependencyGraph.map(edge => `
|
|
1315
|
-
<div class="dep-edge">
|
|
1316
|
-
<code>${escapeHtml(edge.source || '')}</code>
|
|
1317
|
-
<span class="dep-arrow">→</span>
|
|
1318
|
-
<code>${escapeHtml(edge.target || '')}</code>
|
|
1319
|
-
<span class="dep-relationship">(${escapeHtml(edge.relationship || 'depends')})</span>
|
|
1320
|
-
</div>
|
|
1321
|
-
`).join('')}
|
|
1322
|
-
</div>
|
|
1323
|
-
</div>
|
|
1324
|
-
</div>
|
|
1325
|
-
`);
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
return sections.length ? `<div class="multi-cli-files-tab">${sections.join('')}</div>` : `
|
|
1329
|
-
<div class="tab-empty-state">
|
|
1330
|
-
<div class="empty-icon"><i data-lucide="folder-tree" class="w-12 h-12"></i></div>
|
|
1331
|
-
<div class="empty-title">${t('multiCli.empty.files') || 'No Related Files'}</div>
|
|
1332
|
-
</div>
|
|
1333
|
-
`;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
/**
|
|
1337
|
-
* Render file tree nodes recursively
|
|
1338
|
-
*/
|
|
1339
|
-
function renderFileTreeNodes(nodes, depth = 0) {
|
|
1340
|
-
return nodes.map(node => {
|
|
1341
|
-
const indent = depth * 16;
|
|
1342
|
-
const isDir = node.type === 'directory';
|
|
1343
|
-
const icon = isDir ? 'folder' : 'file';
|
|
1344
|
-
const modStatus = node.modificationStatus || 'unchanged';
|
|
1345
|
-
const impactScore = node.impactScore || '';
|
|
1346
|
-
|
|
1347
|
-
let html = `
|
|
1348
|
-
<div class="file-tree-node" style="margin-left: ${indent}px;">
|
|
1349
|
-
<i data-lucide="${icon}" class="w-4 h-4 inline mr-1 file-icon ${modStatus}"></i>
|
|
1350
|
-
<span class="file-path ${modStatus}">${escapeHtml(node.path || '')}</span>
|
|
1351
|
-
${modStatus !== 'unchanged' ? `<span class="mod-status ${modStatus}">${modStatus}</span>` : ''}
|
|
1352
|
-
${impactScore ? `<span class="impact-badge ${impactScore}">${impactScore}</span>` : ''}
|
|
1353
|
-
</div>
|
|
1354
|
-
`;
|
|
1355
|
-
|
|
1356
|
-
if (node.children?.length) {
|
|
1357
|
-
html += renderFileTreeNodes(node.children, depth + 1);
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
return html;
|
|
1361
|
-
}).join('');
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1365
|
-
* Render Planning tab - displays session.plan (plan.json content)
|
|
1366
|
-
* Reuses renderLitePlanTab style with Summary, Approach, Focus Paths, Metadata, and Tasks
|
|
1367
|
-
*/
|
|
1368
|
-
function renderMultiCliPlanningTab(session) {
|
|
1369
|
-
const plan = session.plan;
|
|
1370
|
-
|
|
1371
|
-
if (!plan) {
|
|
1372
|
-
return `
|
|
1373
|
-
<div class="tab-empty-state">
|
|
1374
|
-
<div class="empty-icon"><i data-lucide="ruler" class="w-12 h-12"></i></div>
|
|
1375
|
-
<div class="empty-title">${t('multiCli.empty.planning') || 'No Planning Data'}</div>
|
|
1376
|
-
<div class="empty-text">${t('multiCli.empty.planningText') || 'No plan.json found for this session.'}</div>
|
|
1377
|
-
</div>
|
|
1378
|
-
`;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
return `
|
|
1382
|
-
<div class="plan-tab-content">
|
|
1383
|
-
<!-- Summary -->
|
|
1384
|
-
${plan.summary ? `
|
|
1385
|
-
<div class="plan-section">
|
|
1386
|
-
<h4 class="plan-section-title"><i data-lucide="clipboard-list" class="w-4 h-4 inline mr-1"></i> Summary</h4>
|
|
1387
|
-
<p class="plan-summary-text">${escapeHtml(plan.summary)}</p>
|
|
1388
|
-
</div>
|
|
1389
|
-
` : ''}
|
|
1390
|
-
|
|
1391
|
-
<!-- Root Cause (fix-plan specific) -->
|
|
1392
|
-
${plan.root_cause ? `
|
|
1393
|
-
<div class="plan-section">
|
|
1394
|
-
<h4 class="plan-section-title"><i data-lucide="search" class="w-4 h-4 inline mr-1"></i> Root Cause</h4>
|
|
1395
|
-
<p class="plan-root-cause-text">${escapeHtml(plan.root_cause)}</p>
|
|
1396
|
-
</div>
|
|
1397
|
-
` : ''}
|
|
1398
|
-
|
|
1399
|
-
<!-- Strategy (fix-plan specific) -->
|
|
1400
|
-
${plan.strategy ? `
|
|
1401
|
-
<div class="plan-section">
|
|
1402
|
-
<h4 class="plan-section-title"><i data-lucide="route" class="w-4 h-4 inline mr-1"></i> Fix Strategy</h4>
|
|
1403
|
-
<p class="plan-strategy-text">${escapeHtml(plan.strategy)}</p>
|
|
1404
|
-
</div>
|
|
1405
|
-
` : ''}
|
|
1406
|
-
|
|
1407
|
-
<!-- Approach -->
|
|
1408
|
-
${plan.approach ? `
|
|
1409
|
-
<div class="plan-section">
|
|
1410
|
-
<h4 class="plan-section-title"><i data-lucide="target" class="w-4 h-4 inline mr-1"></i> Approach</h4>
|
|
1411
|
-
<p class="plan-approach-text">${escapeHtml(plan.approach)}</p>
|
|
1412
|
-
</div>
|
|
1413
|
-
` : ''}
|
|
1414
|
-
|
|
1415
|
-
<!-- User Requirements -->
|
|
1416
|
-
${plan.user_requirements ? `
|
|
1417
|
-
<div class="plan-section">
|
|
1418
|
-
<h4 class="plan-section-title"><i data-lucide="user" class="w-4 h-4 inline mr-1"></i> User Requirements</h4>
|
|
1419
|
-
<p class="plan-requirements-text">${escapeHtml(plan.user_requirements)}</p>
|
|
1420
|
-
</div>
|
|
1421
|
-
` : ''}
|
|
1422
|
-
|
|
1423
|
-
<!-- Focus Paths -->
|
|
1424
|
-
${plan.focus_paths?.length ? `
|
|
1425
|
-
<div class="plan-section">
|
|
1426
|
-
<h4 class="plan-section-title"><i data-lucide="folder" class="w-4 h-4 inline mr-1"></i> Focus Paths</h4>
|
|
1427
|
-
<div class="path-tags">
|
|
1428
|
-
${plan.focus_paths.map(p => `<span class="path-tag">${escapeHtml(p)}</span>`).join('')}
|
|
1429
|
-
</div>
|
|
1430
|
-
</div>
|
|
1431
|
-
` : ''}
|
|
1432
|
-
|
|
1433
|
-
<!-- Metadata -->
|
|
1434
|
-
<div class="plan-section">
|
|
1435
|
-
<h4 class="plan-section-title"><i data-lucide="info" class="w-4 h-4 inline mr-1"></i> Metadata</h4>
|
|
1436
|
-
<div class="plan-meta-grid">
|
|
1437
|
-
${plan.severity ? `<div class="meta-item"><span class="meta-label">Severity:</span> <span class="severity-badge ${escapeHtml(plan.severity)}">${escapeHtml(plan.severity)}</span></div>` : ''}
|
|
1438
|
-
${plan.risk_level ? `<div class="meta-item"><span class="meta-label">Risk Level:</span> <span class="risk-badge ${escapeHtml(plan.risk_level)}">${escapeHtml(plan.risk_level)}</span></div>` : ''}
|
|
1439
|
-
${plan.estimated_time ? `<div class="meta-item"><span class="meta-label">Estimated Time:</span> ${escapeHtml(plan.estimated_time)}</div>` : ''}
|
|
1440
|
-
${plan.complexity ? `<div class="meta-item"><span class="meta-label">Complexity:</span> ${escapeHtml(plan.complexity)}</div>` : ''}
|
|
1441
|
-
${plan.recommended_execution ? `<div class="meta-item"><span class="meta-label">Execution:</span> ${escapeHtml(plan.recommended_execution)}</div>` : ''}
|
|
1442
|
-
</div>
|
|
1443
|
-
</div>
|
|
1444
|
-
|
|
1445
|
-
<!-- Tasks (Click to view details) -->
|
|
1446
|
-
${plan.tasks?.length ? `
|
|
1447
|
-
<div class="plan-section">
|
|
1448
|
-
<h4 class="plan-section-title"><i data-lucide="list-checks" class="w-4 h-4 inline mr-1"></i> Tasks (${plan.tasks.length})</h4>
|
|
1449
|
-
<div class="tasks-list multi-cli-tasks-list">
|
|
1450
|
-
${plan.tasks.map((task, idx) => renderMultiCliTaskItem(session.id, task, idx)).join('')}
|
|
1451
|
-
</div>
|
|
1452
|
-
</div>
|
|
1453
|
-
` : ''}
|
|
1454
|
-
|
|
1455
|
-
<!-- Raw JSON -->
|
|
1456
|
-
<div class="plan-section collapsible-section">
|
|
1457
|
-
<div class="collapsible-header">
|
|
1458
|
-
<span class="collapse-icon">▶</span>
|
|
1459
|
-
<span class="section-label">{ } Raw JSON</span>
|
|
1460
|
-
</div>
|
|
1461
|
-
<div class="collapsible-content collapsed">
|
|
1462
|
-
<pre class="json-content">${escapeHtml(JSON.stringify(plan, null, 2))}</pre>
|
|
1463
|
-
</div>
|
|
1464
|
-
</div>
|
|
1465
|
-
</div>
|
|
1466
|
-
`;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
/**
|
|
1470
|
-
* Render a single task item for multi-cli-plan (reuses lite-plan style)
|
|
1471
|
-
* Supports click to open drawer for details
|
|
1472
|
-
*/
|
|
1473
|
-
function renderMultiCliTaskItem(sessionId, task, idx) {
|
|
1474
|
-
const taskId = task.id || `T${idx + 1}`;
|
|
1475
|
-
const taskJsonId = `multi-cli-task-${sessionId}-${taskId}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
1476
|
-
taskJsonStore[taskJsonId] = task;
|
|
1477
|
-
|
|
1478
|
-
// Get preview info - handle both normalized and raw formats
|
|
1479
|
-
// Normalized: meta.type, meta.scope, context.focus_paths, context.acceptance, flow_control.implementation_approach
|
|
1480
|
-
// Raw: action, scope, file, modification_points, implementation, acceptance
|
|
1481
|
-
const taskType = task.meta?.type || task.action || '';
|
|
1482
|
-
const scope = task.meta?.scope || task.scope || task.file || '';
|
|
1483
|
-
const filesCount = task.context?.focus_paths?.length || task.files?.length || task.modification_points?.length || 0;
|
|
1484
|
-
const implCount = task.flow_control?.implementation_approach?.length || task.implementation?.length || 0;
|
|
1485
|
-
const acceptCount = task.context?.acceptance?.length || task.acceptance?.length || task.acceptance_criteria?.length || 0;
|
|
1486
|
-
const dependsCount = task.context?.depends_on?.length || task.depends_on?.length || 0;
|
|
1487
|
-
|
|
1488
|
-
// Escape for data attributes
|
|
1489
|
-
const safeSessionId = escapeHtml(sessionId);
|
|
1490
|
-
const safeTaskId = escapeHtml(taskId);
|
|
1491
|
-
|
|
1492
|
-
return `
|
|
1493
|
-
<div class="detail-task-item-full multi-cli-task-item" data-session-id="${safeSessionId}" data-task-id="${safeTaskId}" style="cursor: pointer;" title="Click to view details">
|
|
1494
|
-
<div class="task-item-header-lite">
|
|
1495
|
-
<span class="task-id-badge">${escapeHtml(taskId)}</span>
|
|
1496
|
-
<span class="task-title">${escapeHtml(task.title || task.name || task.summary || 'Untitled')}</span>
|
|
1497
|
-
<button class="btn-view-json" data-task-json-id="${taskJsonId}" data-task-display-id="${safeTaskId}">{ } JSON</button>
|
|
1498
|
-
</div>
|
|
1499
|
-
<div class="task-item-meta-lite">
|
|
1500
|
-
${taskType ? `<span class="meta-badge action">${escapeHtml(taskType)}</span>` : ''}
|
|
1501
|
-
${scope ? `<span class="meta-badge scope">${escapeHtml(scope)}</span>` : ''}
|
|
1502
|
-
${filesCount > 0 ? `<span class="meta-badge files">${filesCount} files</span>` : ''}
|
|
1503
|
-
${implCount > 0 ? `<span class="meta-badge impl">${implCount} steps</span>` : ''}
|
|
1504
|
-
${acceptCount > 0 ? `<span class="meta-badge accept">${acceptCount} criteria</span>` : ''}
|
|
1505
|
-
${dependsCount > 0 ? `<span class="meta-badge depends">${dependsCount} deps</span>` : ''}
|
|
1506
|
-
</div>
|
|
1507
|
-
</div>
|
|
1508
|
-
`;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
/**
|
|
1512
|
-
* Initialize click handlers for multi-cli task items
|
|
1513
|
-
*/
|
|
1514
|
-
function initMultiCliTaskClickHandlers() {
|
|
1515
|
-
// Task item click handlers
|
|
1516
|
-
document.querySelectorAll('.multi-cli-task-item').forEach(item => {
|
|
1517
|
-
if (!item._clickBound) {
|
|
1518
|
-
item._clickBound = true;
|
|
1519
|
-
item.addEventListener('click', function(e) {
|
|
1520
|
-
// Don't trigger if clicking on JSON button
|
|
1521
|
-
if (e.target.closest('.btn-view-json')) return;
|
|
1522
|
-
|
|
1523
|
-
const sessionId = this.dataset.sessionId;
|
|
1524
|
-
const taskId = this.dataset.taskId;
|
|
1525
|
-
openTaskDrawerForMultiCli(sessionId, taskId);
|
|
1526
|
-
});
|
|
1527
|
-
}
|
|
1528
|
-
});
|
|
1529
|
-
|
|
1530
|
-
// JSON button click handlers
|
|
1531
|
-
document.querySelectorAll('.multi-cli-task-item .btn-view-json').forEach(btn => {
|
|
1532
|
-
if (!btn._clickBound) {
|
|
1533
|
-
btn._clickBound = true;
|
|
1534
|
-
btn.addEventListener('click', function(e) {
|
|
1535
|
-
e.stopPropagation();
|
|
1536
|
-
const taskJsonId = this.dataset.taskJsonId;
|
|
1537
|
-
const displayId = this.dataset.taskDisplayId;
|
|
1538
|
-
showJsonModal(taskJsonId, displayId);
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Open task drawer for multi-cli task
|
|
1546
|
-
*/
|
|
1547
|
-
function openTaskDrawerForMultiCli(sessionId, taskId) {
|
|
1548
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
1549
|
-
if (!session) return;
|
|
1550
|
-
|
|
1551
|
-
// Use session.tasks (normalized from backend) with fallback to plan.tasks
|
|
1552
|
-
const tasks = session.tasks?.length > 0 ? session.tasks : (session.plan?.tasks || []);
|
|
1553
|
-
const task = tasks.find(t => (t.id || `T${tasks.indexOf(t) + 1}`) === taskId);
|
|
1554
|
-
if (!task) return;
|
|
1555
|
-
|
|
1556
|
-
// Set current drawer tasks
|
|
1557
|
-
currentDrawerTasks = tasks;
|
|
1558
|
-
window._currentDrawerSession = session;
|
|
1559
|
-
|
|
1560
|
-
document.getElementById('drawerTaskTitle').textContent = task.title || task.name || task.summary || taskId;
|
|
1561
|
-
document.getElementById('drawerContent').innerHTML = renderMultiCliTaskDrawerContent(task, session);
|
|
1562
|
-
document.getElementById('taskDetailDrawer').classList.add('open');
|
|
1563
|
-
document.getElementById('drawerOverlay').classList.add('active');
|
|
1564
|
-
|
|
1565
|
-
// Re-init lucide icons in drawer
|
|
1566
|
-
setTimeout(() => {
|
|
1567
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1568
|
-
}, 50);
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
/**
|
|
1572
|
-
* Render drawer content for multi-cli task
|
|
1573
|
-
*/
|
|
1574
|
-
function renderMultiCliTaskDrawerContent(task, session) {
|
|
1575
|
-
const taskId = task.id || 'Task';
|
|
1576
|
-
const action = task.action || '';
|
|
1577
|
-
|
|
1578
|
-
return `
|
|
1579
|
-
<!-- Task Header -->
|
|
1580
|
-
<div class="drawer-task-header">
|
|
1581
|
-
<span class="task-id-badge">${escapeHtml(taskId)}</span>
|
|
1582
|
-
${action ? `<span class="action-badge">${escapeHtml(action.toUpperCase())}</span>` : ''}
|
|
1583
|
-
</div>
|
|
1584
|
-
|
|
1585
|
-
<!-- Tab Navigation -->
|
|
1586
|
-
<div class="drawer-tabs">
|
|
1587
|
-
<button class="drawer-tab active" data-tab="overview" onclick="switchMultiCliDrawerTab('overview')">Overview</button>
|
|
1588
|
-
<button class="drawer-tab" data-tab="implementation" onclick="switchMultiCliDrawerTab('implementation')">Implementation</button>
|
|
1589
|
-
<button class="drawer-tab" data-tab="files" onclick="switchMultiCliDrawerTab('files')">Files</button>
|
|
1590
|
-
<button class="drawer-tab" data-tab="raw" onclick="switchMultiCliDrawerTab('raw')">Raw JSON</button>
|
|
1591
|
-
</div>
|
|
1592
|
-
|
|
1593
|
-
<!-- Tab Content -->
|
|
1594
|
-
<div class="drawer-tab-content">
|
|
1595
|
-
<!-- Overview Tab (default) -->
|
|
1596
|
-
<div class="drawer-panel active" data-tab="overview">
|
|
1597
|
-
${renderMultiCliTaskOverview(task)}
|
|
1598
|
-
</div>
|
|
1599
|
-
|
|
1600
|
-
<!-- Implementation Tab -->
|
|
1601
|
-
<div class="drawer-panel" data-tab="implementation">
|
|
1602
|
-
${renderMultiCliTaskImplementation(task)}
|
|
1603
|
-
</div>
|
|
1604
|
-
|
|
1605
|
-
<!-- Files Tab -->
|
|
1606
|
-
<div class="drawer-panel" data-tab="files">
|
|
1607
|
-
${renderMultiCliTaskFiles(task)}
|
|
1608
|
-
</div>
|
|
1609
|
-
|
|
1610
|
-
<!-- Raw JSON Tab -->
|
|
1611
|
-
<div class="drawer-panel" data-tab="raw">
|
|
1612
|
-
<pre class="json-view">${escapeHtml(JSON.stringify(task, null, 2))}</pre>
|
|
1613
|
-
</div>
|
|
1614
|
-
</div>
|
|
1615
|
-
`;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
/**
|
|
1619
|
-
* Switch drawer tab for multi-cli task
|
|
1620
|
-
*/
|
|
1621
|
-
function switchMultiCliDrawerTab(tabName) {
|
|
1622
|
-
document.querySelectorAll('.drawer-tab').forEach(tab => {
|
|
1623
|
-
tab.classList.toggle('active', tab.dataset.tab === tabName);
|
|
1624
|
-
});
|
|
1625
|
-
document.querySelectorAll('.drawer-panel').forEach(panel => {
|
|
1626
|
-
panel.classList.toggle('active', panel.dataset.tab === tabName);
|
|
1627
|
-
});
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* Render multi-cli task overview section
|
|
1632
|
-
* Handles both normalized format (meta, context, flow_control) and raw format
|
|
1633
|
-
*/
|
|
1634
|
-
function renderMultiCliTaskOverview(task) {
|
|
1635
|
-
let sections = [];
|
|
1636
|
-
|
|
1637
|
-
// Extract from both normalized and raw formats
|
|
1638
|
-
const description = task.description || (task.context?.requirements?.length > 0 ? task.context.requirements.join('\n') : '');
|
|
1639
|
-
const scope = task.meta?.scope || task.scope || task.file || '';
|
|
1640
|
-
const acceptance = task.context?.acceptance || task.acceptance || task.acceptance_criteria || [];
|
|
1641
|
-
const dependsOn = task.context?.depends_on || task.depends_on || [];
|
|
1642
|
-
const focusPaths = task.context?.focus_paths || task.files?.map(f => typeof f === 'string' ? f : f.file) || [];
|
|
1643
|
-
const keyPoint = task._raw?.task?.key_point || task.key_point || '';
|
|
1644
|
-
|
|
1645
|
-
// Description/Key Point Card
|
|
1646
|
-
if (description || keyPoint) {
|
|
1647
|
-
sections.push(`
|
|
1648
|
-
<div class="lite-card">
|
|
1649
|
-
<div class="lite-card-header">
|
|
1650
|
-
<span class="lite-card-icon">📝</span>
|
|
1651
|
-
<h4 class="lite-card-title">${t('multiCli.task.description')}</h4>
|
|
1652
|
-
</div>
|
|
1653
|
-
<div class="lite-card-body">
|
|
1654
|
-
${keyPoint ? `<p class="lite-key-point"><strong>${t('multiCli.task.keyPoint')}:</strong> ${escapeHtml(keyPoint)}</p>` : ''}
|
|
1655
|
-
${description ? `<p class="lite-description">${escapeHtml(description)}</p>` : ''}
|
|
1656
|
-
</div>
|
|
1657
|
-
</div>
|
|
1658
|
-
`);
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
// Scope Card
|
|
1662
|
-
if (scope) {
|
|
1663
|
-
sections.push(`
|
|
1664
|
-
<div class="lite-card">
|
|
1665
|
-
<div class="lite-card-header">
|
|
1666
|
-
<span class="lite-card-icon">📂</span>
|
|
1667
|
-
<h4 class="lite-card-title">${t('multiCli.task.scope')}</h4>
|
|
1668
|
-
</div>
|
|
1669
|
-
<div class="lite-card-body">
|
|
1670
|
-
<div class="lite-scope-box">
|
|
1671
|
-
<code>${escapeHtml(scope)}</code>
|
|
1672
|
-
</div>
|
|
1673
|
-
</div>
|
|
1674
|
-
</div>
|
|
1675
|
-
`);
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
// Dependencies Card
|
|
1679
|
-
if (dependsOn.length > 0) {
|
|
1680
|
-
sections.push(`
|
|
1681
|
-
<div class="lite-card">
|
|
1682
|
-
<div class="lite-card-header">
|
|
1683
|
-
<span class="lite-card-icon">🔗</span>
|
|
1684
|
-
<h4 class="lite-card-title">${t('multiCli.task.dependencies')}</h4>
|
|
1685
|
-
</div>
|
|
1686
|
-
<div class="lite-card-body">
|
|
1687
|
-
<div class="lite-deps-list">
|
|
1688
|
-
${dependsOn.map(dep => `<span class="dep-badge">${escapeHtml(dep)}</span>`).join('')}
|
|
1689
|
-
</div>
|
|
1690
|
-
</div>
|
|
1691
|
-
</div>
|
|
1692
|
-
`);
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
// Focus Paths / Files Card
|
|
1696
|
-
if (focusPaths.length > 0) {
|
|
1697
|
-
sections.push(`
|
|
1698
|
-
<div class="lite-card">
|
|
1699
|
-
<div class="lite-card-header">
|
|
1700
|
-
<span class="lite-card-icon">📁</span>
|
|
1701
|
-
<h4 class="lite-card-title">${t('multiCli.task.targetFiles')}</h4>
|
|
1702
|
-
</div>
|
|
1703
|
-
<div class="lite-card-body">
|
|
1704
|
-
<ul class="lite-file-list">
|
|
1705
|
-
${focusPaths.map(f => `<li><code>${escapeHtml(f)}</code></li>`).join('')}
|
|
1706
|
-
</ul>
|
|
1707
|
-
</div>
|
|
1708
|
-
</div>
|
|
1709
|
-
`);
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
// Acceptance Criteria Card
|
|
1713
|
-
if (acceptance.length > 0) {
|
|
1714
|
-
sections.push(`
|
|
1715
|
-
<div class="lite-card">
|
|
1716
|
-
<div class="lite-card-header">
|
|
1717
|
-
<span class="lite-card-icon">✅</span>
|
|
1718
|
-
<h4 class="lite-card-title">${t('multiCli.task.acceptanceCriteria')}</h4>
|
|
1719
|
-
</div>
|
|
1720
|
-
<div class="lite-card-body">
|
|
1721
|
-
<ul class="lite-acceptance-list">
|
|
1722
|
-
${acceptance.map(ac => `<li>${escapeHtml(ac)}</li>`).join('')}
|
|
1723
|
-
</ul>
|
|
1724
|
-
</div>
|
|
1725
|
-
</div>
|
|
1726
|
-
`);
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
// Reference Card
|
|
1730
|
-
if (task.reference) {
|
|
1731
|
-
const ref = task.reference;
|
|
1732
|
-
sections.push(`
|
|
1733
|
-
<div class="lite-card">
|
|
1734
|
-
<div class="lite-card-header">
|
|
1735
|
-
<span class="lite-card-icon">📚</span>
|
|
1736
|
-
<h4 class="lite-card-title">${t('multiCli.task.reference')}</h4>
|
|
1737
|
-
</div>
|
|
1738
|
-
<div class="lite-card-body">
|
|
1739
|
-
${ref.pattern ? `<div class="ref-item"><strong>${t('multiCli.task.pattern')}:</strong> ${escapeHtml(ref.pattern)}</div>` : ''}
|
|
1740
|
-
${ref.files?.length ? `<div class="ref-item"><strong>${t('multiCli.task.files')}:</strong><br><code class="ref-files">${ref.files.map(f => escapeHtml(f)).join('\n')}</code></div>` : ''}
|
|
1741
|
-
${ref.examples ? `<div class="ref-item"><strong>${t('multiCli.task.examples')}:</strong> ${escapeHtml(ref.examples)}</div>` : ''}
|
|
1742
|
-
</div>
|
|
1743
|
-
</div>
|
|
1744
|
-
`);
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
return sections.length ? sections.join('') : `<div class="empty-section">${t('multiCli.task.noOverviewData')}</div>`;
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
/**
|
|
1751
|
-
* Render multi-cli task implementation section
|
|
1752
|
-
* Handles both normalized format (flow_control.implementation_approach) and raw format
|
|
1753
|
-
*/
|
|
1754
|
-
function renderMultiCliTaskImplementation(task) {
|
|
1755
|
-
let sections = [];
|
|
1756
|
-
|
|
1757
|
-
// Get implementation steps from normalized or raw format
|
|
1758
|
-
const implApproach = task.flow_control?.implementation_approach || [];
|
|
1759
|
-
const rawImpl = task.implementation || [];
|
|
1760
|
-
const modPoints = task.modification_points || [];
|
|
1761
|
-
|
|
1762
|
-
// Modification Points / Flow Control Implementation Approach
|
|
1763
|
-
if (implApproach.length > 0) {
|
|
1764
|
-
sections.push(`
|
|
1765
|
-
<div class="drawer-section">
|
|
1766
|
-
<h4 class="drawer-section-title">
|
|
1767
|
-
<i data-lucide="list-ordered" class="w-4 h-4"></i>
|
|
1768
|
-
${t('multiCli.task.implementationSteps')}
|
|
1769
|
-
</h4>
|
|
1770
|
-
<ol class="impl-steps-detail-list">
|
|
1771
|
-
${implApproach.map((step, idx) => `
|
|
1772
|
-
<li class="impl-step-item">
|
|
1773
|
-
<span class="step-num">${step.step || (idx + 1)}</span>
|
|
1774
|
-
<span class="step-text">${escapeHtml(step.action || step)}</span>
|
|
1775
|
-
</li>
|
|
1776
|
-
`).join('')}
|
|
1777
|
-
</ol>
|
|
1778
|
-
</div>
|
|
1779
|
-
`);
|
|
1780
|
-
} else if (modPoints.length > 0) {
|
|
1781
|
-
sections.push(`
|
|
1782
|
-
<div class="drawer-section">
|
|
1783
|
-
<h4 class="drawer-section-title">
|
|
1784
|
-
<i data-lucide="file-edit" class="w-4 h-4"></i>
|
|
1785
|
-
${t('multiCli.task.modificationPoints')}
|
|
1786
|
-
</h4>
|
|
1787
|
-
<ul class="mod-points-detail-list">
|
|
1788
|
-
${modPoints.map(mp => `
|
|
1789
|
-
<li class="mod-point-item">
|
|
1790
|
-
<code class="mod-file">${escapeHtml(mp.file || '')}</code>
|
|
1791
|
-
${mp.target ? `<span class="mod-target">→ ${escapeHtml(mp.target)}</span>` : ''}
|
|
1792
|
-
${mp.function_name ? `<span class="mod-func">→ ${escapeHtml(mp.function_name)}</span>` : ''}
|
|
1793
|
-
${mp.change || mp.change_type ? `<span class="mod-change">(${escapeHtml(mp.change || mp.change_type)})</span>` : ''}
|
|
1794
|
-
</li>
|
|
1795
|
-
`).join('')}
|
|
1796
|
-
</ul>
|
|
1797
|
-
</div>
|
|
1798
|
-
`);
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// Raw Implementation Steps (if not already rendered via implApproach)
|
|
1802
|
-
if (rawImpl.length > 0 && implApproach.length === 0) {
|
|
1803
|
-
sections.push(`
|
|
1804
|
-
<div class="drawer-section">
|
|
1805
|
-
<h4 class="drawer-section-title">
|
|
1806
|
-
<i data-lucide="list-ordered" class="w-4 h-4"></i>
|
|
1807
|
-
${t('multiCli.task.implementationSteps')}
|
|
1808
|
-
</h4>
|
|
1809
|
-
<ol class="impl-steps-detail-list">
|
|
1810
|
-
${rawImpl.map((step, idx) => `
|
|
1811
|
-
<li class="impl-step-item">
|
|
1812
|
-
<span class="step-num">${idx + 1}</span>
|
|
1813
|
-
<span class="step-text">${escapeHtml(step)}</span>
|
|
1814
|
-
</li>
|
|
1815
|
-
`).join('')}
|
|
1816
|
-
</ol>
|
|
1817
|
-
</div>
|
|
1818
|
-
`);
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
// Verification
|
|
1822
|
-
if (task.verification?.length) {
|
|
1823
|
-
sections.push(`
|
|
1824
|
-
<div class="drawer-section">
|
|
1825
|
-
<h4 class="drawer-section-title">
|
|
1826
|
-
<i data-lucide="check-circle" class="w-4 h-4"></i>
|
|
1827
|
-
${t('multiCli.task.verification')}
|
|
1828
|
-
</h4>
|
|
1829
|
-
<ul class="verification-list">
|
|
1830
|
-
${task.verification.map(v => `<li>${escapeHtml(v)}</li>`).join('')}
|
|
1831
|
-
</ul>
|
|
1832
|
-
</div>
|
|
1833
|
-
`);
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
return sections.length ? sections.join('') : `<div class="empty-section">${t('multiCli.task.noImplementationData')}</div>`;
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
/**
|
|
1840
|
-
* Render multi-cli task files section
|
|
1841
|
-
* Handles both normalized format (context.focus_paths) and raw format
|
|
1842
|
-
*/
|
|
1843
|
-
function renderMultiCliTaskFiles(task) {
|
|
1844
|
-
const files = [];
|
|
1845
|
-
|
|
1846
|
-
// Collect from normalized format (context.focus_paths)
|
|
1847
|
-
if (task.context?.focus_paths) {
|
|
1848
|
-
task.context.focus_paths.forEach(f => {
|
|
1849
|
-
if (f && !files.includes(f)) files.push(f);
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
// Collect from raw files array (plan.json format)
|
|
1854
|
-
if (task.files) {
|
|
1855
|
-
task.files.forEach(f => {
|
|
1856
|
-
const filePath = typeof f === 'string' ? f : f.file;
|
|
1857
|
-
if (filePath && !files.includes(filePath)) files.push(filePath);
|
|
1858
|
-
});
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
// Collect from modification_points
|
|
1862
|
-
if (task.modification_points) {
|
|
1863
|
-
task.modification_points.forEach(mp => {
|
|
1864
|
-
if (mp.file && !files.includes(mp.file)) files.push(mp.file);
|
|
1865
|
-
});
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
// Collect from scope/file (legacy)
|
|
1869
|
-
if (task.scope && !files.includes(task.scope)) files.push(task.scope);
|
|
1870
|
-
if (task.file && !files.includes(task.file)) files.push(task.file);
|
|
1871
|
-
|
|
1872
|
-
// Collect from reference.files
|
|
1873
|
-
if (task.reference?.files) {
|
|
1874
|
-
task.reference.files.forEach(f => {
|
|
1875
|
-
if (f && !files.includes(f)) files.push(f);
|
|
1876
|
-
});
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
if (files.length === 0) {
|
|
1880
|
-
return `<div class="empty-section">${t('multiCli.task.noFilesSpecified')}</div>`;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
return `
|
|
1884
|
-
<div class="drawer-section">
|
|
1885
|
-
<h4 class="drawer-section-title">${t('multiCli.task.targetFiles')}</h4>
|
|
1886
|
-
<ul class="target-files-list">
|
|
1887
|
-
${files.map(f => `
|
|
1888
|
-
<li class="file-item">
|
|
1889
|
-
<span class="file-icon">📄</span>
|
|
1890
|
-
<code>${escapeHtml(f)}</code>
|
|
1891
|
-
</li>
|
|
1892
|
-
`).join('')}
|
|
1893
|
-
</ul>
|
|
1894
|
-
</div>
|
|
1895
|
-
`;
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
/**
|
|
1899
|
-
* Render a single requirement item
|
|
1900
|
-
*/
|
|
1901
|
-
function renderRequirementItem(req) {
|
|
1902
|
-
const priorityColors = {
|
|
1903
|
-
'critical': 'error',
|
|
1904
|
-
'high': 'warning',
|
|
1905
|
-
'medium': 'info',
|
|
1906
|
-
'low': 'default'
|
|
1907
|
-
};
|
|
1908
|
-
const priority = req.priority || 'medium';
|
|
1909
|
-
const colorClass = priorityColors[priority] || 'default';
|
|
1910
|
-
|
|
1911
|
-
return `
|
|
1912
|
-
<div class="requirement-item">
|
|
1913
|
-
<div class="requirement-header">
|
|
1914
|
-
<span class="requirement-id">${escapeHtml(req.id || '')}</span>
|
|
1915
|
-
<span class="priority-badge ${colorClass}">${escapeHtml(priority)}</span>
|
|
1916
|
-
</div>
|
|
1917
|
-
<div class="requirement-desc">${escapeHtml(getI18nText(req.description))}</div>
|
|
1918
|
-
${req.source ? `<div class="requirement-source">${t('multiCli.source') || 'Source'}: ${escapeHtml(req.source)}</div>` : ''}
|
|
1919
|
-
</div>
|
|
1920
|
-
`;
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
/**
|
|
1924
|
-
* Render Decision tab
|
|
1925
|
-
* Shows: selectedSolution, rejectedAlternatives, confidenceScore
|
|
1926
|
-
*/
|
|
1927
|
-
function renderMultiCliDecisionTab(session) {
|
|
1928
|
-
// Use helper to extract decision from synthesis data structure
|
|
1929
|
-
const decision = extractDecisionFromSynthesis(session.latestSynthesis);
|
|
1930
|
-
|
|
1931
|
-
if (!decision || !decision.selectedSolution) {
|
|
1932
|
-
return `
|
|
1933
|
-
<div class="tab-empty-state">
|
|
1934
|
-
<div class="empty-icon"><i data-lucide="check-circle" class="w-12 h-12"></i></div>
|
|
1935
|
-
<div class="empty-title">${t('multiCli.empty.decision') || 'No Decision Yet'}</div>
|
|
1936
|
-
<div class="empty-text">${t('multiCli.empty.decisionText') || 'No decision has been made for this discussion yet.'}</div>
|
|
1937
|
-
</div>
|
|
1938
|
-
`;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
const status = decision.status || 'pending';
|
|
1942
|
-
const summary = getI18nText(decision.summary) || '';
|
|
1943
|
-
const selectedSolution = decision.selectedSolution || null;
|
|
1944
|
-
const rejectedAlternatives = decision.rejectedAlternatives || [];
|
|
1945
|
-
const confidenceScore = decision.confidenceScore || 0;
|
|
1946
|
-
|
|
1947
|
-
let sections = [];
|
|
1948
|
-
|
|
1949
|
-
// Decision Status and Summary
|
|
1950
|
-
sections.push(`
|
|
1951
|
-
<div class="multi-cli-section decision-header-section">
|
|
1952
|
-
<div class="decision-status-bar ${confidenceScore >= 0.7 ? 'converged' : 'divergent'}">
|
|
1953
|
-
<div class="decision-status-wrapper">
|
|
1954
|
-
<span class="decision-status ${status}">${escapeHtml(status)}</span>
|
|
1955
|
-
</div>
|
|
1956
|
-
<div class="decision-confidence">
|
|
1957
|
-
<span class="decision-confidence-label">${t('multiCli.confidence') || 'Confidence'}:</span>
|
|
1958
|
-
<div class="decision-confidence-bar">
|
|
1959
|
-
<div class="decision-confidence-fill" style="width: ${(confidenceScore * 100).toFixed(0)}%"></div>
|
|
1960
|
-
</div>
|
|
1961
|
-
<span class="decision-confidence-value">${(confidenceScore * 100).toFixed(0)}%</span>
|
|
1962
|
-
</div>
|
|
1963
|
-
</div>
|
|
1964
|
-
${summary ? `<p class="decision-summary-text">${escapeHtml(summary)}</p>` : ''}
|
|
1965
|
-
</div>
|
|
1966
|
-
`);
|
|
1967
|
-
|
|
1968
|
-
// Selected Solution
|
|
1969
|
-
if (selectedSolution) {
|
|
1970
|
-
sections.push(`
|
|
1971
|
-
<div class="multi-cli-section selected-solution-section">
|
|
1972
|
-
<h4 class="section-title"><i data-lucide="check-circle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.selectedSolution') || 'Selected Solution'}</h4>
|
|
1973
|
-
${renderSolutionCard(selectedSolution, true)}
|
|
1974
|
-
</div>
|
|
1975
|
-
`);
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
// Rejected Alternatives
|
|
1979
|
-
if (rejectedAlternatives.length) {
|
|
1980
|
-
sections.push(`
|
|
1981
|
-
<div class="multi-cli-section rejected-section collapsible-section">
|
|
1982
|
-
<div class="collapsible-header">
|
|
1983
|
-
<span class="collapse-icon">►</span>
|
|
1984
|
-
<span class="section-label"><i data-lucide="x-circle" class="w-4 h-4 inline mr-1"></i> ${t('multiCli.rejectedAlternatives') || 'Rejected Alternatives'} (${rejectedAlternatives.length})</span>
|
|
1985
|
-
</div>
|
|
1986
|
-
<div class="collapsible-content collapsed">
|
|
1987
|
-
${rejectedAlternatives.map(alt => renderSolutionCard(alt, false)).join('')}
|
|
1988
|
-
</div>
|
|
1989
|
-
</div>
|
|
1990
|
-
`);
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
return `<div class="multi-cli-decision-tab">${sections.join('')}</div>`;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
/**
|
|
1997
|
-
* Render a solution card
|
|
1998
|
-
*/
|
|
1999
|
-
function renderSolutionCard(solution, isSelected) {
|
|
2000
|
-
const title = getI18nText(solution.title) || 'Untitled Solution';
|
|
2001
|
-
const description = getI18nText(solution.description) || '';
|
|
2002
|
-
const pros = solution.pros || [];
|
|
2003
|
-
const cons = solution.cons || [];
|
|
2004
|
-
const risk = solution.risk || 'medium';
|
|
2005
|
-
const effort = getI18nText(solution.estimatedEffort) || '';
|
|
2006
|
-
const rejectionReason = solution.rejectionReason ? getI18nText(solution.rejectionReason) : '';
|
|
2007
|
-
const sourceCLIs = solution.sourceCLIs || [];
|
|
2008
|
-
|
|
2009
|
-
return `
|
|
2010
|
-
<div class="solution-card ${isSelected ? 'selected' : 'rejected'}">
|
|
2011
|
-
<div class="solution-header">
|
|
2012
|
-
<span class="solution-id">${escapeHtml(solution.id || '')}</span>
|
|
2013
|
-
<span class="solution-title">${escapeHtml(title)}</span>
|
|
2014
|
-
<span class="risk-badge ${risk}">${escapeHtml(risk)}</span>
|
|
2015
|
-
</div>
|
|
2016
|
-
${description ? `<p class="solution-desc">${escapeHtml(description)}</p>` : ''}
|
|
2017
|
-
${rejectionReason ? `<div class="rejection-reason"><strong>${t('multiCli.rejectionReason') || 'Reason'}:</strong> ${escapeHtml(rejectionReason)}</div>` : ''}
|
|
2018
|
-
<div class="solution-details">
|
|
2019
|
-
${pros.length ? `
|
|
2020
|
-
<div class="pros-section">
|
|
2021
|
-
<strong>${t('multiCli.pros') || 'Pros'}:</strong>
|
|
2022
|
-
<ul class="pros-list">${pros.map(p => `<li class="pro-item">${escapeHtml(getI18nText(p))}</li>`).join('')}</ul>
|
|
2023
|
-
</div>
|
|
2024
|
-
` : ''}
|
|
2025
|
-
${cons.length ? `
|
|
2026
|
-
<div class="cons-section">
|
|
2027
|
-
<strong>${t('multiCli.cons') || 'Cons'}:</strong>
|
|
2028
|
-
<ul class="cons-list">${cons.map(c => `<li class="con-item">${escapeHtml(getI18nText(c))}</li>`).join('')}</ul>
|
|
2029
|
-
</div>
|
|
2030
|
-
` : ''}
|
|
2031
|
-
${effort ? `<div class="effort-estimate"><strong>${t('multiCli.effort') || 'Effort'}:</strong> ${escapeHtml(effort)}</div>` : ''}
|
|
2032
|
-
${sourceCLIs.length ? `<div class="source-clis"><strong>${t('multiCli.sources') || 'Sources'}:</strong> ${sourceCLIs.map(s => `<span class="cli-badge">${escapeHtml(s)}</span>`).join('')}</div>` : ''}
|
|
2033
|
-
</div>
|
|
2034
|
-
</div>
|
|
2035
|
-
`;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
/**
|
|
2039
|
-
* Render Timeline tab
|
|
2040
|
-
* Shows: decisionRecords.timeline
|
|
2041
|
-
*/
|
|
2042
|
-
function renderMultiCliTimelineTab(session) {
|
|
2043
|
-
// Use helper to extract timeline from synthesis data structure
|
|
2044
|
-
const timeline = extractTimelineFromSynthesis(session.latestSynthesis);
|
|
2045
|
-
|
|
2046
|
-
if (!timeline || !timeline.length) {
|
|
2047
|
-
return `
|
|
2048
|
-
<div class="tab-empty-state">
|
|
2049
|
-
<div class="empty-icon"><i data-lucide="git-commit" class="w-12 h-12"></i></div>
|
|
2050
|
-
<div class="empty-title">${t('multiCli.empty.timeline') || 'No Timeline Events'}</div>
|
|
2051
|
-
<div class="empty-text">${t('multiCli.empty.timelineText') || 'No decision timeline available for this session.'}</div>
|
|
2052
|
-
</div>
|
|
2053
|
-
`;
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
const eventTypeIcons = {
|
|
2057
|
-
'proposal': 'lightbulb',
|
|
2058
|
-
'argument': 'message-square',
|
|
2059
|
-
'agreement': 'thumbs-up',
|
|
2060
|
-
'disagreement': 'thumbs-down',
|
|
2061
|
-
'decision': 'check-circle',
|
|
2062
|
-
'reversal': 'rotate-ccw'
|
|
2063
|
-
};
|
|
2064
|
-
|
|
2065
|
-
return `
|
|
2066
|
-
<div class="multi-cli-timeline-tab">
|
|
2067
|
-
<div class="timeline-container">
|
|
2068
|
-
${timeline.map(event => {
|
|
2069
|
-
const icon = eventTypeIcons[event.type] || 'circle';
|
|
2070
|
-
const contributor = event.contributor || {};
|
|
2071
|
-
const summary = getI18nText(event.summary) || '';
|
|
2072
|
-
const evidence = event.evidence || [];
|
|
2073
|
-
|
|
2074
|
-
return `
|
|
2075
|
-
<div class="timeline-event event-${event.type || 'default'}">
|
|
2076
|
-
<div class="timeline-marker">
|
|
2077
|
-
<i data-lucide="${icon}" class="w-4 h-4"></i>
|
|
2078
|
-
</div>
|
|
2079
|
-
<div class="timeline-content">
|
|
2080
|
-
<div class="event-header">
|
|
2081
|
-
<span class="event-type ${event.type || ''}">${escapeHtml(event.type || 'event')}</span>
|
|
2082
|
-
<span class="event-contributor"><i data-lucide="user" class="w-3.5 h-3.5"></i>${escapeHtml(contributor.name || 'Unknown')}</span>
|
|
2083
|
-
<span class="event-time">${formatDate(event.timestamp)}</span>
|
|
2084
|
-
</div>
|
|
2085
|
-
<div class="event-summary">${escapeHtml(summary)}</div>
|
|
2086
|
-
${event.reversibility ? `<span class="reversibility-badge ${event.reversibility}">${escapeHtml(event.reversibility)}</span>` : ''}
|
|
2087
|
-
${evidence.length ? `
|
|
2088
|
-
<div class="event-evidence">
|
|
2089
|
-
${evidence.map(ev => `
|
|
2090
|
-
<div class="evidence-item evidence-${ev.type || 'reference'}">
|
|
2091
|
-
<span class="evidence-type">${escapeHtml(ev.type || 'reference')}</span>
|
|
2092
|
-
<span class="evidence-desc">${escapeHtml(getI18nText(ev.description))}</span>
|
|
2093
|
-
</div>
|
|
2094
|
-
`).join('')}
|
|
2095
|
-
</div>
|
|
2096
|
-
` : ''}
|
|
2097
|
-
</div>
|
|
2098
|
-
</div>
|
|
2099
|
-
`;
|
|
2100
|
-
}).join('')}
|
|
2101
|
-
</div>
|
|
2102
|
-
</div>
|
|
2103
|
-
`;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
/**
|
|
2107
|
-
* Render Rounds tab
|
|
2108
|
-
* Shows: navigation between round synthesis files
|
|
2109
|
-
*/
|
|
2110
|
-
function renderMultiCliRoundsTab(session) {
|
|
2111
|
-
const rounds = session.rounds || [];
|
|
2112
|
-
const metadata = session.metadata || {};
|
|
2113
|
-
const totalRounds = metadata.roundId || rounds.length || 1;
|
|
2114
|
-
|
|
2115
|
-
if (!rounds.length && totalRounds <= 1) {
|
|
2116
|
-
// Show current synthesis as single round
|
|
2117
|
-
return `
|
|
2118
|
-
<div class="multi-cli-rounds-tab">
|
|
2119
|
-
<div class="rounds-nav">
|
|
2120
|
-
<div class="round-item active" data-round="1">
|
|
2121
|
-
<span class="round-number">Round 1</span>
|
|
2122
|
-
<span class="round-status">${t('multiCli.currentRound') || 'Current'}</span>
|
|
2123
|
-
</div>
|
|
2124
|
-
</div>
|
|
2125
|
-
<div class="round-content">
|
|
2126
|
-
<div class="round-info">
|
|
2127
|
-
<p>${t('multiCli.singleRoundInfo') || 'This is a single-round discussion. View other tabs for details.'}</p>
|
|
2128
|
-
</div>
|
|
2129
|
-
</div>
|
|
2130
|
-
</div>
|
|
2131
|
-
`;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
// Render round navigation and content
|
|
2135
|
-
return `
|
|
2136
|
-
<div class="multi-cli-rounds-tab">
|
|
2137
|
-
<div class="rounds-nav">
|
|
2138
|
-
${rounds.map((round, idx) => {
|
|
2139
|
-
const roundNum = idx + 1;
|
|
2140
|
-
const isActive = roundNum === totalRounds;
|
|
2141
|
-
const roundStatus = round.convergence?.recommendation || 'continue';
|
|
2142
|
-
|
|
2143
|
-
return `
|
|
2144
|
-
<div class="round-item ${isActive ? 'active' : ''}" data-round="${roundNum}" onclick="loadMultiCliRound('${currentSessionDetailKey}', ${roundNum})">
|
|
2145
|
-
<span class="round-number">Round ${roundNum}</span>
|
|
2146
|
-
<span class="round-status ${roundStatus}">${escapeHtml(roundStatus)}</span>
|
|
2147
|
-
</div>
|
|
2148
|
-
`;
|
|
2149
|
-
}).join('')}
|
|
2150
|
-
</div>
|
|
2151
|
-
<div class="round-content" id="multiCliRoundContent">
|
|
2152
|
-
${renderRoundContent(rounds[totalRounds - 1] || rounds[0] || session)}
|
|
2153
|
-
</div>
|
|
2154
|
-
</div>
|
|
2155
|
-
`;
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
/**
|
|
2159
|
-
* Render content for a specific round
|
|
2160
|
-
*/
|
|
2161
|
-
function renderRoundContent(round) {
|
|
2162
|
-
if (!round) {
|
|
2163
|
-
return `<div class="round-empty">${t('multiCli.noRoundData') || 'No data for this round.'}</div>`;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
const metadata = round.metadata || {};
|
|
2167
|
-
const agents = metadata.contributingAgents || [];
|
|
2168
|
-
const convergence = round._internal?.convergence || {};
|
|
2169
|
-
const crossVerification = round._internal?.cross_verification || {};
|
|
2170
|
-
|
|
2171
|
-
let sections = [];
|
|
2172
|
-
|
|
2173
|
-
// Round metadata
|
|
2174
|
-
sections.push(`
|
|
2175
|
-
<div class="round-metadata">
|
|
2176
|
-
<div class="meta-row">
|
|
2177
|
-
<span class="meta-label">${t('multiCli.roundId') || 'Round'}:</span>
|
|
2178
|
-
<span class="meta-value">${metadata.roundId || 1}</span>
|
|
2179
|
-
</div>
|
|
2180
|
-
<div class="meta-row">
|
|
2181
|
-
<span class="meta-label">${t('multiCli.timestamp') || 'Time'}:</span>
|
|
2182
|
-
<span class="meta-value">${formatDate(metadata.timestamp)}</span>
|
|
2183
|
-
</div>
|
|
2184
|
-
${metadata.durationSeconds ? `
|
|
2185
|
-
<div class="meta-row">
|
|
2186
|
-
<span class="meta-label">${t('multiCli.duration') || 'Duration'}:</span>
|
|
2187
|
-
<span class="meta-value">${metadata.durationSeconds}s</span>
|
|
2188
|
-
</div>
|
|
2189
|
-
` : ''}
|
|
2190
|
-
</div>
|
|
2191
|
-
`);
|
|
2192
|
-
|
|
2193
|
-
// Contributing agents
|
|
2194
|
-
if (agents.length) {
|
|
2195
|
-
sections.push(`
|
|
2196
|
-
<div class="round-agents">
|
|
2197
|
-
<strong>${t('multiCli.contributors') || 'Contributors'}:</strong>
|
|
2198
|
-
${agents.map(agent => `<span class="agent-badge">${escapeHtml(agent.name || agent.id)}</span>`).join('')}
|
|
2199
|
-
</div>
|
|
2200
|
-
`);
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
// Convergence metrics
|
|
2204
|
-
if (convergence.score !== undefined) {
|
|
2205
|
-
sections.push(`
|
|
2206
|
-
<div class="round-convergence">
|
|
2207
|
-
<strong>${t('multiCli.convergence') || 'Convergence'}:</strong>
|
|
2208
|
-
<span class="convergence-score">${(convergence.score * 100).toFixed(0)}%</span>
|
|
2209
|
-
<span class="convergence-rec ${convergence.recommendation || ''}">${escapeHtml(convergence.recommendation || '')}</span>
|
|
2210
|
-
${convergence.new_insights ? `<span class="new-insights-badge">${t('multiCli.newInsights') || 'New Insights'}</span>` : ''}
|
|
2211
|
-
</div>
|
|
2212
|
-
`);
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
// Cross-verification
|
|
2216
|
-
if (crossVerification.agreements?.length || crossVerification.disagreements?.length) {
|
|
2217
|
-
sections.push(`
|
|
2218
|
-
<div class="round-verification collapsible-section">
|
|
2219
|
-
<div class="collapsible-header">
|
|
2220
|
-
<span class="collapse-icon">►</span>
|
|
2221
|
-
<span class="section-label">${t('multiCli.crossVerification') || 'Cross-Verification'}</span>
|
|
2222
|
-
</div>
|
|
2223
|
-
<div class="collapsible-content collapsed">
|
|
2224
|
-
${crossVerification.agreements?.length ? `
|
|
2225
|
-
<div class="agreements">
|
|
2226
|
-
<strong>${t('multiCli.agreements') || 'Agreements'}:</strong>
|
|
2227
|
-
<ul>${crossVerification.agreements.map(a => `<li class="agreement">${escapeHtml(a)}</li>`).join('')}</ul>
|
|
2228
|
-
</div>
|
|
2229
|
-
` : ''}
|
|
2230
|
-
${crossVerification.disagreements?.length ? `
|
|
2231
|
-
<div class="disagreements">
|
|
2232
|
-
<strong>${t('multiCli.disagreements') || 'Disagreements'}:</strong>
|
|
2233
|
-
<ul>${crossVerification.disagreements.map(d => `<li class="disagreement">${escapeHtml(d)}</li>`).join('')}</ul>
|
|
2234
|
-
</div>
|
|
2235
|
-
` : ''}
|
|
2236
|
-
${crossVerification.resolution ? `
|
|
2237
|
-
<div class="resolution">
|
|
2238
|
-
<strong>${t('multiCli.resolution') || 'Resolution'}:</strong>
|
|
2239
|
-
<p>${escapeHtml(crossVerification.resolution)}</p>
|
|
2240
|
-
</div>
|
|
2241
|
-
` : ''}
|
|
2242
|
-
</div>
|
|
2243
|
-
</div>
|
|
2244
|
-
`);
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
// Round solutions
|
|
2248
|
-
if (round.solutions && round.solutions.length > 0) {
|
|
2249
|
-
sections.push(`
|
|
2250
|
-
<div class="round-solutions">
|
|
2251
|
-
<strong>${t('multiCli.solutions') || 'Solutions'} (${round.solutions.length}):</strong>
|
|
2252
|
-
<div class="solutions-list">
|
|
2253
|
-
${round.solutions.map((solution, idx) => `
|
|
2254
|
-
<div class="solution-card">
|
|
2255
|
-
<div class="solution-header">
|
|
2256
|
-
<div class="solution-title">
|
|
2257
|
-
<span class="solution-number">${idx + 1}</span>
|
|
2258
|
-
<span class="solution-name">${escapeHtml(solution.name || `Solution ${idx + 1}`)}</span>
|
|
2259
|
-
</div>
|
|
2260
|
-
<div class="solution-meta">
|
|
2261
|
-
${solution.source_cli?.length ? `
|
|
2262
|
-
<div class="source-clis">
|
|
2263
|
-
${solution.source_cli.map(cli => `<span class="cli-badge">${escapeHtml(cli)}</span>`).join('')}
|
|
2264
|
-
</div>
|
|
2265
|
-
` : ''}
|
|
2266
|
-
<div class="solution-scores">
|
|
2267
|
-
<span class="score-badge feasibility" title="Feasibility">
|
|
2268
|
-
${Math.round((solution.feasibility || 0) * 100)}%
|
|
2269
|
-
</span>
|
|
2270
|
-
<span class="score-badge effort-${solution.effort || 'medium'}" title="Effort">
|
|
2271
|
-
${escapeHtml(solution.effort || 'medium')}
|
|
2272
|
-
</span>
|
|
2273
|
-
<span class="score-badge risk-${solution.risk || 'medium'}" title="Risk">
|
|
2274
|
-
${escapeHtml(solution.risk || 'medium')}
|
|
2275
|
-
</span>
|
|
2276
|
-
</div>
|
|
2277
|
-
</div>
|
|
2278
|
-
</div>
|
|
2279
|
-
|
|
2280
|
-
${solution.summary ? `
|
|
2281
|
-
<div class="solution-summary">
|
|
2282
|
-
${escapeHtml(getI18nText(solution.summary))}
|
|
2283
|
-
</div>
|
|
2284
|
-
` : ''}
|
|
2285
|
-
|
|
2286
|
-
${solution.implementation_plan?.approach ? `
|
|
2287
|
-
<div class="solution-approach collapsible-section">
|
|
2288
|
-
<div class="collapsible-header">
|
|
2289
|
-
<span class="collapse-icon">►</span>
|
|
2290
|
-
<span class="section-label">${t('multiCli.implementation') || 'Implementation Approach'}</span>
|
|
2291
|
-
</div>
|
|
2292
|
-
<div class="collapsible-content collapsed">
|
|
2293
|
-
<p>${escapeHtml(getI18nText(solution.implementation_plan.approach))}</p>
|
|
2294
|
-
|
|
2295
|
-
${solution.implementation_plan.tasks?.length ? `
|
|
2296
|
-
<div class="solution-tasks">
|
|
2297
|
-
<strong>${t('multiCli.tasks') || 'Tasks'}:</strong>
|
|
2298
|
-
<ul class="task-list">
|
|
2299
|
-
${solution.implementation_plan.tasks.map(task => `
|
|
2300
|
-
<li class="task-item">
|
|
2301
|
-
<span class="task-id">${escapeHtml(task.id || '')}</span>
|
|
2302
|
-
<span class="task-name">${escapeHtml(getI18nText(task.name))}</span>
|
|
2303
|
-
${task.key_point ? `<span class="task-key-point">${escapeHtml(getI18nText(task.key_point))}</span>` : ''}
|
|
2304
|
-
</li>
|
|
2305
|
-
`).join('')}
|
|
2306
|
-
</ul>
|
|
2307
|
-
</div>
|
|
2308
|
-
` : ''}
|
|
2309
|
-
|
|
2310
|
-
${solution.implementation_plan.execution_flow ? `
|
|
2311
|
-
<div class="execution-flow">
|
|
2312
|
-
<strong>${t('multiCli.executionFlow') || 'Execution Flow'}:</strong>
|
|
2313
|
-
<code class="flow-code">${escapeHtml(solution.implementation_plan.execution_flow)}</code>
|
|
2314
|
-
</div>
|
|
2315
|
-
` : ''}
|
|
2316
|
-
|
|
2317
|
-
${solution.implementation_plan.milestones?.length ? `
|
|
2318
|
-
<div class="solution-milestones">
|
|
2319
|
-
<strong>${t('multiCli.milestones') || 'Milestones'}:</strong>
|
|
2320
|
-
<ul class="milestone-list">
|
|
2321
|
-
${solution.implementation_plan.milestones.map(milestone => `
|
|
2322
|
-
<li class="milestone-item">${escapeHtml(getI18nText(milestone))}</li>
|
|
2323
|
-
`).join('')}
|
|
2324
|
-
</ul>
|
|
2325
|
-
</div>
|
|
2326
|
-
` : ''}
|
|
2327
|
-
</div>
|
|
2328
|
-
</div>
|
|
2329
|
-
` : ''}
|
|
2330
|
-
|
|
2331
|
-
${(solution.dependencies?.internal?.length || solution.dependencies?.external?.length) ? `
|
|
2332
|
-
<div class="solution-dependencies collapsible-section">
|
|
2333
|
-
<div class="collapsible-header">
|
|
2334
|
-
<span class="collapse-icon">►</span>
|
|
2335
|
-
<span class="section-label">${t('multiCli.dependencies') || 'Dependencies'}</span>
|
|
2336
|
-
</div>
|
|
2337
|
-
<div class="collapsible-content collapsed">
|
|
2338
|
-
${solution.dependencies.internal?.length ? `
|
|
2339
|
-
<div class="internal-deps">
|
|
2340
|
-
<strong>${t('multiCli.internalDeps') || 'Internal'}:</strong>
|
|
2341
|
-
<ul class="dep-list">
|
|
2342
|
-
${solution.dependencies.internal.map(dep => `
|
|
2343
|
-
<li class="dep-item">${escapeHtml(getI18nText(dep))}</li>
|
|
2344
|
-
`).join('')}
|
|
2345
|
-
</ul>
|
|
2346
|
-
</div>
|
|
2347
|
-
` : ''}
|
|
2348
|
-
${solution.dependencies.external?.length ? `
|
|
2349
|
-
<div class="external-deps">
|
|
2350
|
-
<strong>${t('multiCli.externalDeps') || 'External'}:</strong>
|
|
2351
|
-
<ul class="dep-list">
|
|
2352
|
-
${solution.dependencies.external.map(dep => `
|
|
2353
|
-
<li class="dep-item">${escapeHtml(getI18nText(dep))}</li>
|
|
2354
|
-
`).join('')}
|
|
2355
|
-
</ul>
|
|
2356
|
-
</div>
|
|
2357
|
-
` : ''}
|
|
2358
|
-
</div>
|
|
2359
|
-
</div>
|
|
2360
|
-
` : ''}
|
|
2361
|
-
|
|
2362
|
-
${solution.technical_concerns?.length ? `
|
|
2363
|
-
<div class="solution-concerns collapsible-section">
|
|
2364
|
-
<div class="collapsible-header">
|
|
2365
|
-
<span class="collapse-icon">►</span>
|
|
2366
|
-
<span class="section-label">${t('multiCli.technicalConcerns') || 'Technical Concerns'}</span>
|
|
2367
|
-
</div>
|
|
2368
|
-
<div class="collapsible-content collapsed">
|
|
2369
|
-
<ul class="concern-list">
|
|
2370
|
-
${solution.technical_concerns.map(concern => `
|
|
2371
|
-
<li class="concern-item">${escapeHtml(getI18nText(concern))}</li>
|
|
2372
|
-
`).join('')}
|
|
2373
|
-
</ul>
|
|
2374
|
-
</div>
|
|
2375
|
-
</div>
|
|
2376
|
-
` : ''}
|
|
2377
|
-
</div>
|
|
2378
|
-
`).join('')}
|
|
2379
|
-
</div>
|
|
2380
|
-
</div>
|
|
2381
|
-
`);
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
return sections.join('');
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
|
-
/**
|
|
2388
|
-
* Load a specific round's data (async, may fetch from server)
|
|
2389
|
-
*/
|
|
2390
|
-
async function loadMultiCliRound(sessionKey, roundNum) {
|
|
2391
|
-
const session = liteTaskDataStore[sessionKey];
|
|
2392
|
-
if (!session) return;
|
|
2393
|
-
|
|
2394
|
-
// Update active state in nav
|
|
2395
|
-
document.querySelectorAll('.round-item').forEach(item => {
|
|
2396
|
-
item.classList.toggle('active', parseInt(item.dataset.round) === roundNum);
|
|
2397
|
-
});
|
|
2398
|
-
|
|
2399
|
-
const contentArea = document.getElementById('multiCliRoundContent');
|
|
2400
|
-
|
|
2401
|
-
// If we have rounds array, use it
|
|
2402
|
-
if (session.rounds && session.rounds[roundNum - 1]) {
|
|
2403
|
-
contentArea.innerHTML = renderRoundContent(session.rounds[roundNum - 1]);
|
|
2404
|
-
initCollapsibleSections(contentArea);
|
|
2405
|
-
return;
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
// Otherwise try to fetch from server
|
|
2409
|
-
if (window.SERVER_MODE && session.path) {
|
|
2410
|
-
contentArea.innerHTML = `<div class="tab-loading">${t('common.loading') || 'Loading...'}</div>`;
|
|
2411
|
-
try {
|
|
2412
|
-
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=round&round=${roundNum}`);
|
|
2413
|
-
if (response.ok) {
|
|
2414
|
-
const data = await response.json();
|
|
2415
|
-
contentArea.innerHTML = renderRoundContent(data.round || {});
|
|
2416
|
-
initCollapsibleSections(contentArea);
|
|
2417
|
-
return;
|
|
2418
|
-
}
|
|
2419
|
-
} catch (err) {
|
|
2420
|
-
console.error('Failed to load round:', err);
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
// Fallback
|
|
2425
|
-
contentArea.innerHTML = `<div class="round-empty">${t('multiCli.noRoundData') || 'No data for this round.'}</div>`;
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
/**
|
|
2429
|
-
* Render Discussion Section (combines Topic, Rounds, Decision)
|
|
2430
|
-
* Uses accordion layout to display discussion rounds
|
|
2431
|
-
*/
|
|
2432
|
-
function renderMultiCliDiscussionSection(session) {
|
|
2433
|
-
const rounds = session.rounds || [];
|
|
2434
|
-
const metadata = session.metadata || {};
|
|
2435
|
-
const totalRounds = metadata.roundId || rounds.length || 1;
|
|
2436
|
-
const topic = session.discussionTopic || session.latestSynthesis?.discussionTopic || {};
|
|
2437
|
-
|
|
2438
|
-
// If no rounds, show topic summary and current synthesis
|
|
2439
|
-
if (!rounds.length) {
|
|
2440
|
-
const title = getI18nText(topic.title) || t('multiCli.discussion.discussionTopic');
|
|
2441
|
-
const description = getI18nText(topic.description) || '';
|
|
2442
|
-
const status = topic.status || session.status || 'analyzing';
|
|
2443
|
-
|
|
2444
|
-
return `
|
|
2445
|
-
<div class="multi-cli-discussion-section">
|
|
2446
|
-
<div class="discussion-header">
|
|
2447
|
-
<h3 class="discussion-title">${escapeHtml(title)}</h3>
|
|
2448
|
-
<span class="discussion-status ${status}">${escapeHtml(status)}</span>
|
|
2449
|
-
</div>
|
|
2450
|
-
${description ? `<p class="discussion-description">${escapeHtml(description)}</p>` : ''}
|
|
2451
|
-
<div class="discussion-empty-state">
|
|
2452
|
-
<i data-lucide="message-circle" class="w-8 h-8"></i>
|
|
2453
|
-
<p>${t('multiCli.singleRoundInfo')}</p>
|
|
2454
|
-
</div>
|
|
2455
|
-
</div>
|
|
2456
|
-
`;
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
// Render accordion for multiple rounds
|
|
2460
|
-
const accordionItems = rounds.map((round, idx) => {
|
|
2461
|
-
const roundNum = idx + 1;
|
|
2462
|
-
const isLatest = roundNum === totalRounds;
|
|
2463
|
-
const roundMeta = round.metadata || {};
|
|
2464
|
-
const convergence = round._internal?.convergence || round.convergence || {};
|
|
2465
|
-
const recommendation = convergence.recommendation || 'continue';
|
|
2466
|
-
const score = convergence.score !== undefined ? Math.round(convergence.score * 100) : null;
|
|
2467
|
-
const solutions = round.solutions || [];
|
|
2468
|
-
const agents = roundMeta.contributingAgents || [];
|
|
2469
|
-
|
|
2470
|
-
return `
|
|
2471
|
-
<div class="discussion-round collapsible-section ${isLatest ? 'expanded' : ''}">
|
|
2472
|
-
<div class="collapsible-header discussion-round-header">
|
|
2473
|
-
<span class="collapse-icon">${isLatest ? '▼' : '►'}</span>
|
|
2474
|
-
<div class="round-title-group">
|
|
2475
|
-
<span class="round-badge">${t('multiCli.round') || 'Round'} ${roundNum}</span>
|
|
2476
|
-
<span class="round-timestamp">${formatDate(roundMeta.timestamp)}</span>
|
|
2477
|
-
</div>
|
|
2478
|
-
<div class="round-indicators">
|
|
2479
|
-
${score !== null ? `<span class="convergence-badge" title="${t('multiCli.convergence') || 'Convergence'}">${score}%</span>` : ''}
|
|
2480
|
-
<span class="recommendation-badge ${recommendation}">${escapeHtml(recommendation)}</span>
|
|
2481
|
-
</div>
|
|
2482
|
-
</div>
|
|
2483
|
-
<div class="collapsible-content ${isLatest ? '' : 'collapsed'}">
|
|
2484
|
-
<!-- Discussion Topic for this round -->
|
|
2485
|
-
${round.discussionTopic ? `
|
|
2486
|
-
<div class="round-topic">
|
|
2487
|
-
<h4 class="round-section-title"><i data-lucide="message-circle" class="w-4 h-4 inline"></i> ${t('multiCli.topic') || 'Topic'}</h4>
|
|
2488
|
-
<p>${escapeHtml(getI18nText(round.discussionTopic.title || round.discussionTopic))}</p>
|
|
2489
|
-
</div>
|
|
2490
|
-
` : ''}
|
|
2491
|
-
|
|
2492
|
-
<!-- Contributing Agents -->
|
|
2493
|
-
${agents.length ? `
|
|
2494
|
-
<div class="round-agents">
|
|
2495
|
-
<h4 class="round-section-title"><i data-lucide="users" class="w-4 h-4 inline"></i> ${t('multiCli.contributors') || 'Contributors'}</h4>
|
|
2496
|
-
<div class="agent-badges">
|
|
2497
|
-
${agents.map(agent => `<span class="agent-badge">${escapeHtml(agent.name || agent.id || agent)}</span>`).join('')}
|
|
2498
|
-
</div>
|
|
2499
|
-
</div>
|
|
2500
|
-
` : ''}
|
|
2501
|
-
|
|
2502
|
-
<!-- Solutions -->
|
|
2503
|
-
${solutions.length ? `
|
|
2504
|
-
<div class="round-solutions-summary">
|
|
2505
|
-
<h4 class="round-section-title"><i data-lucide="lightbulb" class="w-4 h-4 inline"></i> ${t('multiCli.solutions')} (${solutions.length})</h4>
|
|
2506
|
-
<div class="solution-cards-grid">
|
|
2507
|
-
${solutions.map((sol, sidx) => `
|
|
2508
|
-
<div class="solution-mini-card">
|
|
2509
|
-
<div class="solution-mini-header">
|
|
2510
|
-
<span class="solution-number">${sidx + 1}</span>
|
|
2511
|
-
<span class="solution-name">${escapeHtml(sol.name || `${t('multiCli.summary.solution')} ${sidx + 1}`)}</span>
|
|
2512
|
-
</div>
|
|
2513
|
-
<div class="solution-mini-scores">
|
|
2514
|
-
<span class="score-pill feasibility" title="${t('multiCli.feasibility')}">${Math.round((sol.feasibility || 0) * 100)}%</span>
|
|
2515
|
-
<span class="score-pill effort-${sol.effort || 'medium'}">${escapeHtml(sol.effort || 'M')}</span>
|
|
2516
|
-
<span class="score-pill risk-${sol.risk || 'medium'}">${escapeHtml(sol.risk || 'M')}</span>
|
|
2517
|
-
</div>
|
|
2518
|
-
${sol.summary ? `<p class="solution-mini-summary">${escapeHtml(getI18nText(sol.summary).substring(0, 100))}${getI18nText(sol.summary).length > 100 ? '...' : ''}</p>` : ''}
|
|
2519
|
-
</div>
|
|
2520
|
-
`).join('')}
|
|
2521
|
-
</div>
|
|
2522
|
-
</div>
|
|
2523
|
-
` : ''}
|
|
2524
|
-
|
|
2525
|
-
<!-- Decision/Recommendation -->
|
|
2526
|
-
${convergence.reasoning || round.decision ? `
|
|
2527
|
-
<div class="round-decision">
|
|
2528
|
-
<h4 class="round-section-title"><i data-lucide="check-circle" class="w-4 h-4 inline"></i> ${t('multiCli.decision')}</h4>
|
|
2529
|
-
<p class="decision-text">${escapeHtml(convergence.reasoning || round.decision || '')}</p>
|
|
2530
|
-
</div>
|
|
2531
|
-
` : ''}
|
|
2532
|
-
</div>
|
|
2533
|
-
</div>
|
|
2534
|
-
`;
|
|
2535
|
-
}).join('');
|
|
2536
|
-
|
|
2537
|
-
return `
|
|
2538
|
-
<div class="multi-cli-discussion-section">
|
|
2539
|
-
<div class="discussion-header">
|
|
2540
|
-
<h3 class="discussion-title">${escapeHtml(getI18nText(topic.title) || t('multiCli.discussion.title'))}</h3>
|
|
2541
|
-
<span class="rounds-count">${totalRounds} ${t('multiCli.tab.rounds')}</span>
|
|
2542
|
-
</div>
|
|
2543
|
-
<div class="discussion-accordion">
|
|
2544
|
-
${accordionItems}
|
|
2545
|
-
</div>
|
|
2546
|
-
</div>
|
|
2547
|
-
`;
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
|
-
/**
|
|
2551
|
-
* Render Association Section (context-package key fields)
|
|
2552
|
-
* Shows solution summary, dependencies, consensus
|
|
2553
|
-
*/
|
|
2554
|
-
function renderMultiCliAssociationSection(session) {
|
|
2555
|
-
const contextPkg = session.contextPackage || session.context_package || session.latestSynthesis?.context_package || {};
|
|
2556
|
-
const solutions = contextPkg.solutions || session.latestSynthesis?.solutions || [];
|
|
2557
|
-
const dependencies = contextPkg.dependencies || {};
|
|
2558
|
-
const consensus = contextPkg.consensus || session.latestSynthesis?._internal?.cross_verification || {};
|
|
2559
|
-
const relatedFiles = extractFilesFromSynthesis(session.latestSynthesis);
|
|
2560
|
-
|
|
2561
|
-
// Check if we have any content to display
|
|
2562
|
-
const hasSolutions = solutions.length > 0;
|
|
2563
|
-
const hasDependencies = dependencies.internal?.length || dependencies.external?.length;
|
|
2564
|
-
const hasConsensus = consensus.agreements?.length || consensus.resolved_conflicts?.length || consensus.disagreements?.length;
|
|
2565
|
-
const hasFiles = relatedFiles?.fileTree?.length || relatedFiles?.impactSummary?.length;
|
|
2566
|
-
|
|
2567
|
-
if (!hasSolutions && !hasDependencies && !hasConsensus && !hasFiles) {
|
|
2568
|
-
return `
|
|
2569
|
-
<div class="tab-empty-state">
|
|
2570
|
-
<div class="empty-icon"><i data-lucide="link-2" class="w-12 h-12"></i></div>
|
|
2571
|
-
<div class="empty-title">${t('multiCli.empty.association') || 'No Association Data'}</div>
|
|
2572
|
-
<div class="empty-text">${t('multiCli.empty.associationText') || 'No context package or related files available for this session.'}</div>
|
|
2573
|
-
</div>
|
|
2574
|
-
`;
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
let sections = [];
|
|
2578
|
-
|
|
2579
|
-
// Solution Summary Cards
|
|
2580
|
-
if (hasSolutions) {
|
|
2581
|
-
sections.push(`
|
|
2582
|
-
<div class="association-section solutions-section">
|
|
2583
|
-
<h4 class="association-section-title">
|
|
2584
|
-
<i data-lucide="lightbulb" class="w-4 h-4 inline"></i>
|
|
2585
|
-
${t('multiCli.solutionSummary') || 'Solution Summary'}
|
|
2586
|
-
</h4>
|
|
2587
|
-
<div class="association-cards-grid">
|
|
2588
|
-
${solutions.map((sol, idx) => `
|
|
2589
|
-
<div class="association-card solution-card">
|
|
2590
|
-
<div class="card-header">
|
|
2591
|
-
<span class="card-number">${idx + 1}</span>
|
|
2592
|
-
<span class="card-title">${escapeHtml(sol.name || 'Solution ' + (idx + 1))}</span>
|
|
2593
|
-
</div>
|
|
2594
|
-
<div class="card-metrics">
|
|
2595
|
-
<div class="metric">
|
|
2596
|
-
<span class="metric-label">${t('multiCli.feasibility') || 'Feasibility'}</span>
|
|
2597
|
-
<span class="metric-value">${Math.round((sol.feasibility || 0) * 100)}%</span>
|
|
2598
|
-
</div>
|
|
2599
|
-
<div class="metric">
|
|
2600
|
-
<span class="metric-label">${t('multiCli.effort') || 'Effort'}</span>
|
|
2601
|
-
<span class="metric-value effort-${sol.effort || 'medium'}">${escapeHtml(sol.effort || 'medium')}</span>
|
|
2602
|
-
</div>
|
|
2603
|
-
<div class="metric">
|
|
2604
|
-
<span class="metric-label">${t('multiCli.risk') || 'Risk'}</span>
|
|
2605
|
-
<span class="metric-value risk-${sol.risk || 'medium'}">${escapeHtml(sol.risk || 'medium')}</span>
|
|
2606
|
-
</div>
|
|
2607
|
-
</div>
|
|
2608
|
-
${sol.summary ? `<p class="card-description">${escapeHtml(getI18nText(sol.summary))}</p>` : ''}
|
|
2609
|
-
</div>
|
|
2610
|
-
`).join('')}
|
|
2611
|
-
</div>
|
|
2612
|
-
</div>
|
|
2613
|
-
`);
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
// Dependencies Card
|
|
2617
|
-
if (hasDependencies) {
|
|
2618
|
-
sections.push(`
|
|
2619
|
-
<div class="association-section dependencies-section">
|
|
2620
|
-
<h4 class="association-section-title">
|
|
2621
|
-
<i data-lucide="git-branch" class="w-4 h-4 inline"></i>
|
|
2622
|
-
${t('multiCli.dependencies') || 'Dependencies'}
|
|
2623
|
-
</h4>
|
|
2624
|
-
<div class="dependencies-grid">
|
|
2625
|
-
${dependencies.internal?.length ? `
|
|
2626
|
-
<div class="association-card dependency-card">
|
|
2627
|
-
<div class="card-header">
|
|
2628
|
-
<i data-lucide="folder" class="w-4 h-4"></i>
|
|
2629
|
-
<span class="card-title">${t('multiCli.internalDeps') || 'Internal'}</span>
|
|
2630
|
-
<span class="card-count">${dependencies.internal.length}</span>
|
|
2631
|
-
</div>
|
|
2632
|
-
<ul class="dependency-list">
|
|
2633
|
-
${dependencies.internal.map(dep => `<li>${escapeHtml(getI18nText(dep))}</li>`).join('')}
|
|
2634
|
-
</ul>
|
|
2635
|
-
</div>
|
|
2636
|
-
` : ''}
|
|
2637
|
-
${dependencies.external?.length ? `
|
|
2638
|
-
<div class="association-card dependency-card">
|
|
2639
|
-
<div class="card-header">
|
|
2640
|
-
<i data-lucide="package" class="w-4 h-4"></i>
|
|
2641
|
-
<span class="card-title">${t('multiCli.externalDeps') || 'External'}</span>
|
|
2642
|
-
<span class="card-count">${dependencies.external.length}</span>
|
|
2643
|
-
</div>
|
|
2644
|
-
<ul class="dependency-list">
|
|
2645
|
-
${dependencies.external.map(dep => `<li>${escapeHtml(getI18nText(dep))}</li>`).join('')}
|
|
2646
|
-
</ul>
|
|
2647
|
-
</div>
|
|
2648
|
-
` : ''}
|
|
2649
|
-
</div>
|
|
2650
|
-
</div>
|
|
2651
|
-
`);
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
// Consensus Card
|
|
2655
|
-
if (hasConsensus) {
|
|
2656
|
-
sections.push(`
|
|
2657
|
-
<div class="association-section consensus-section">
|
|
2658
|
-
<h4 class="association-section-title">
|
|
2659
|
-
<i data-lucide="check-check" class="w-4 h-4 inline"></i>
|
|
2660
|
-
${t('multiCli.consensus') || 'Consensus'}
|
|
2661
|
-
</h4>
|
|
2662
|
-
<div class="consensus-grid">
|
|
2663
|
-
${consensus.agreements?.length ? `
|
|
2664
|
-
<div class="association-card consensus-card agreements">
|
|
2665
|
-
<div class="card-header">
|
|
2666
|
-
<i data-lucide="thumbs-up" class="w-4 h-4"></i>
|
|
2667
|
-
<span class="card-title">${t('multiCli.agreements') || 'Agreements'}</span>
|
|
2668
|
-
<span class="card-count">${consensus.agreements.length}</span>
|
|
2669
|
-
</div>
|
|
2670
|
-
<ul class="consensus-list">
|
|
2671
|
-
${consensus.agreements.map(item => `<li class="agreement-item">${escapeHtml(item)}</li>`).join('')}
|
|
2672
|
-
</ul>
|
|
2673
|
-
</div>
|
|
2674
|
-
` : ''}
|
|
2675
|
-
${(consensus.resolved_conflicts?.length || consensus.disagreements?.length) ? `
|
|
2676
|
-
<div class="association-card consensus-card conflicts">
|
|
2677
|
-
<div class="card-header">
|
|
2678
|
-
<i data-lucide="git-merge" class="w-4 h-4"></i>
|
|
2679
|
-
<span class="card-title">${t('multiCli.resolvedConflicts') || 'Resolved Conflicts'}</span>
|
|
2680
|
-
<span class="card-count">${(consensus.resolved_conflicts || consensus.disagreements || []).length}</span>
|
|
2681
|
-
</div>
|
|
2682
|
-
<ul class="consensus-list">
|
|
2683
|
-
${(consensus.resolved_conflicts || consensus.disagreements || []).map(item => `<li class="conflict-item">${escapeHtml(item)}</li>`).join('')}
|
|
2684
|
-
</ul>
|
|
2685
|
-
</div>
|
|
2686
|
-
` : ''}
|
|
2687
|
-
</div>
|
|
2688
|
-
</div>
|
|
2689
|
-
`);
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
// Related Files (from existing Files tab logic)
|
|
2693
|
-
if (hasFiles) {
|
|
2694
|
-
sections.push(`
|
|
2695
|
-
<div class="association-section files-section">
|
|
2696
|
-
<h4 class="association-section-title">
|
|
2697
|
-
<i data-lucide="folder-tree" class="w-4 h-4 inline"></i>
|
|
2698
|
-
${t('multiCli.tab.files') || 'Related Files'}
|
|
2699
|
-
</h4>
|
|
2700
|
-
<div class="files-summary">
|
|
2701
|
-
${relatedFiles.fileTree?.length ? `
|
|
2702
|
-
<div class="files-list">
|
|
2703
|
-
${relatedFiles.fileTree.slice(0, 10).map(file => `
|
|
2704
|
-
<div class="file-item">
|
|
2705
|
-
<i data-lucide="file" class="w-3 h-3"></i>
|
|
2706
|
-
<span class="file-path">${escapeHtml(typeof file === 'string' ? file : file.path || file.name)}</span>
|
|
2707
|
-
</div>
|
|
2708
|
-
`).join('')}
|
|
2709
|
-
${relatedFiles.fileTree.length > 10 ? `
|
|
2710
|
-
<div class="files-more">+${relatedFiles.fileTree.length - 10} ${t('common.more') || 'more'}</div>
|
|
2711
|
-
` : ''}
|
|
2712
|
-
</div>
|
|
2713
|
-
` : ''}
|
|
2714
|
-
${relatedFiles.impactSummary?.length ? `
|
|
2715
|
-
<div class="impact-summary">
|
|
2716
|
-
<h5>${t('multiCli.impactSummary') || 'Impact Summary'}</h5>
|
|
2717
|
-
<ul>
|
|
2718
|
-
${relatedFiles.impactSummary.slice(0, 5).map(item => `<li>${escapeHtml(getI18nText(item))}</li>`).join('')}
|
|
2719
|
-
</ul>
|
|
2720
|
-
</div>
|
|
2721
|
-
` : ''}
|
|
2722
|
-
</div>
|
|
2723
|
-
</div>
|
|
2724
|
-
`);
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
return `
|
|
2728
|
-
<div class="multi-cli-association-section">
|
|
2729
|
-
${sections.join('')}
|
|
2730
|
-
</div>
|
|
2731
|
-
`;
|
|
2732
|
-
}
|
|
2733
|
-
|
|
2734
|
-
// Lite Task Detail Page
|
|
2735
|
-
function showLiteTaskDetailPage(sessionKey) {
|
|
2736
|
-
const session = liteTaskDataStore[sessionKey];
|
|
2737
|
-
if (!session) return;
|
|
2738
|
-
|
|
2739
|
-
currentView = 'liteTaskDetail';
|
|
2740
|
-
currentSessionDetailKey = sessionKey;
|
|
2741
|
-
|
|
2742
|
-
// Hide stats grid and carousel on detail pages
|
|
2743
|
-
hideStatsAndCarousel();
|
|
2744
|
-
|
|
2745
|
-
// Also store in sessionDataStore for tab switching compatibility
|
|
2746
|
-
sessionDataStore[sessionKey] = {
|
|
2747
|
-
...session,
|
|
2748
|
-
session_id: session.id,
|
|
2749
|
-
created_at: session.createdAt,
|
|
2750
|
-
path: session.path,
|
|
2751
|
-
type: session.type
|
|
2752
|
-
};
|
|
2753
|
-
|
|
2754
|
-
const container = document.getElementById('mainContent');
|
|
2755
|
-
const tasks = session.tasks || [];
|
|
2756
|
-
const plan = session.plan || {};
|
|
2757
|
-
const progress = session.progress || { total: 0, completed: 0, percentage: 0 };
|
|
2758
|
-
|
|
2759
|
-
const completed = tasks.filter(t => t.status === 'completed').length;
|
|
2760
|
-
const inProgress = tasks.filter(t => t.status === 'in_progress').length;
|
|
2761
|
-
const pending = tasks.filter(t => t.status === 'pending').length;
|
|
2762
|
-
|
|
2763
|
-
container.innerHTML = `
|
|
2764
|
-
<div class="session-detail-page lite-task-detail-page">
|
|
2765
|
-
<!-- Header -->
|
|
2766
|
-
<div class="detail-header">
|
|
2767
|
-
<button class="btn-back" onclick="goBackToLiteTasks()">
|
|
2768
|
-
<span class="back-icon">←</span>
|
|
2769
|
-
<span>${session.type === 'lite-plan' ? t('lite.backToList', { type: 'Plan' }) : session.type === 'lite-fix' ? t('lite.backToList', { type: 'Fix' }) : t('multiCli.backToList')}</span>
|
|
2770
|
-
</button>
|
|
2771
|
-
<div class="detail-title-row">
|
|
2772
|
-
<h2 class="detail-session-id">${session.type === 'lite-plan' ? '<i data-lucide="file-edit" class="w-5 h-5 inline mr-2"></i>' : session.type === 'lite-fix' ? '<i data-lucide="wrench" class="w-5 h-5 inline mr-2"></i>' : '<i data-lucide="speech-icon" class="w-5 h-5 inline mr-2"></i>'} ${escapeHtml(session.id)}</h2>
|
|
2773
|
-
<div class="detail-badges">
|
|
2774
|
-
<span class="session-type-badge ${session.type}">${session.type === 'multi-cli-plan' ? 'MULTI-CLI' : session.type}</span>
|
|
2775
|
-
</div>
|
|
2776
|
-
</div>
|
|
2777
|
-
</div>
|
|
2778
|
-
|
|
2779
|
-
<!-- Session Info Bar -->
|
|
2780
|
-
<div class="detail-info-bar">
|
|
2781
|
-
<div class="info-item">
|
|
2782
|
-
<span class="info-label">${t('detail.created')}</span>
|
|
2783
|
-
<span class="info-value">${formatDate(session.createdAt)}</span>
|
|
2784
|
-
</div>
|
|
2785
|
-
<div class="info-item">
|
|
2786
|
-
<span class="info-label">${t('detail.tasks')}</span>
|
|
2787
|
-
<span class="info-value">${tasks.length} ${t('session.tasks')}</span>
|
|
2788
|
-
</div>
|
|
2789
|
-
</div>
|
|
2790
|
-
|
|
2791
|
-
<!-- Tab Navigation -->
|
|
2792
|
-
<div class="detail-tabs">
|
|
2793
|
-
<button class="detail-tab active" data-tab="tasks" onclick="switchLiteDetailTab('tasks')">
|
|
2794
|
-
<span class="tab-icon"><i data-lucide="list-checks" class="w-4 h-4"></i></span>
|
|
2795
|
-
<span class="tab-text">${t('tab.tasks')}</span>
|
|
2796
|
-
<span class="tab-count">${tasks.length}</span>
|
|
2797
|
-
</button>
|
|
2798
|
-
<button class="detail-tab" data-tab="plan" onclick="switchLiteDetailTab('plan')">
|
|
2799
|
-
<span class="tab-icon"><i data-lucide="ruler" class="w-4 h-4"></i></span>
|
|
2800
|
-
<span class="tab-text">${t('tab.plan')}</span>
|
|
2801
|
-
</button>
|
|
2802
|
-
${session.type === 'lite-fix' ? `
|
|
2803
|
-
<button class="detail-tab" data-tab="diagnoses" onclick="switchLiteDetailTab('diagnoses')">
|
|
2804
|
-
<span class="tab-icon"><i data-lucide="stethoscope" class="w-4 h-4"></i></span>
|
|
2805
|
-
<span class="tab-text">${t('tab.diagnoses')}</span>
|
|
2806
|
-
${session.diagnoses?.items?.length ? `<span class="tab-count">${session.diagnoses.items.length}</span>` : ''}
|
|
2807
|
-
</button>
|
|
2808
|
-
` : ''}
|
|
2809
|
-
<button class="detail-tab" data-tab="context" onclick="switchLiteDetailTab('context')">
|
|
2810
|
-
<span class="tab-icon"><i data-lucide="package" class="w-4 h-4"></i></span>
|
|
2811
|
-
<span class="tab-text">${t('tab.context')}</span>
|
|
2812
|
-
</button>
|
|
2813
|
-
<button class="detail-tab" data-tab="summary" onclick="switchLiteDetailTab('summary')">
|
|
2814
|
-
<span class="tab-icon"><i data-lucide="file-text" class="w-4 h-4"></i></span>
|
|
2815
|
-
<span class="tab-text">${t('tab.summary')}</span>
|
|
2816
|
-
</button>
|
|
2817
|
-
</div>
|
|
2818
|
-
|
|
2819
|
-
<!-- Tab Content -->
|
|
2820
|
-
<div class="detail-tab-content active" id="liteDetailTabContent">
|
|
2821
|
-
${renderLiteTasksTab(session, tasks, completed, inProgress, pending)}
|
|
2822
|
-
</div>
|
|
2823
|
-
</div>
|
|
2824
|
-
`;
|
|
2825
|
-
|
|
2826
|
-
// Initialize collapsible sections and task click handlers
|
|
2827
|
-
setTimeout(() => {
|
|
2828
|
-
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
2829
|
-
header.addEventListener('click', () => toggleSection(header));
|
|
2830
|
-
});
|
|
2831
|
-
// Bind click events to lite task items on initial load
|
|
2832
|
-
initLiteTaskClickHandlers();
|
|
2833
|
-
}, 50);
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
function goBackToLiteTasks() {
|
|
2837
|
-
currentView = 'liteTasks';
|
|
2838
|
-
currentSessionDetailKey = null;
|
|
2839
|
-
updateContentTitle();
|
|
2840
|
-
showStatsAndSearch();
|
|
2841
|
-
renderLiteTasks();
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
function switchLiteDetailTab(tabName) {
|
|
2845
|
-
// Update active tab
|
|
2846
|
-
document.querySelectorAll('.detail-tab').forEach(tab => {
|
|
2847
|
-
tab.classList.toggle('active', tab.dataset.tab === tabName);
|
|
2848
|
-
});
|
|
2849
|
-
|
|
2850
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
2851
|
-
if (!session) return;
|
|
2852
|
-
|
|
2853
|
-
const contentArea = document.getElementById('liteDetailTabContent');
|
|
2854
|
-
const tasks = session.tasks || [];
|
|
2855
|
-
const completed = tasks.filter(t => t.status === 'completed').length;
|
|
2856
|
-
const inProgress = tasks.filter(t => t.status === 'in_progress').length;
|
|
2857
|
-
const pending = tasks.filter(t => t.status === 'pending').length;
|
|
2858
|
-
|
|
2859
|
-
switch (tabName) {
|
|
2860
|
-
case 'tasks':
|
|
2861
|
-
contentArea.innerHTML = renderLiteTasksTab(session, tasks, completed, inProgress, pending);
|
|
2862
|
-
// Re-initialize collapsible sections and task click handlers
|
|
2863
|
-
setTimeout(() => {
|
|
2864
|
-
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
2865
|
-
header.addEventListener('click', () => toggleSection(header));
|
|
2866
|
-
});
|
|
2867
|
-
// Bind click events to lite task items
|
|
2868
|
-
initLiteTaskClickHandlers();
|
|
2869
|
-
}, 50);
|
|
2870
|
-
break;
|
|
2871
|
-
case 'plan':
|
|
2872
|
-
contentArea.innerHTML = renderLitePlanTab(session);
|
|
2873
|
-
// Re-initialize collapsible sections for plan tab
|
|
2874
|
-
setTimeout(() => {
|
|
2875
|
-
initCollapsibleSections(contentArea);
|
|
2876
|
-
}, 50);
|
|
2877
|
-
break;
|
|
2878
|
-
case 'diagnoses':
|
|
2879
|
-
contentArea.innerHTML = renderDiagnosesTab(session);
|
|
2880
|
-
// Re-initialize collapsible sections for diagnoses tab
|
|
2881
|
-
setTimeout(() => {
|
|
2882
|
-
initCollapsibleSections(contentArea);
|
|
2883
|
-
}, 50);
|
|
2884
|
-
break;
|
|
2885
|
-
case 'context':
|
|
2886
|
-
loadAndRenderLiteContextTab(session, contentArea);
|
|
2887
|
-
break;
|
|
2888
|
-
case 'summary':
|
|
2889
|
-
loadAndRenderLiteSummaryTab(session, contentArea);
|
|
2890
|
-
break;
|
|
2891
|
-
}
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
function renderLiteTasksTab(session, tasks, completed, inProgress, pending) {
|
|
2895
|
-
// Populate drawer tasks for click-to-open functionality
|
|
2896
|
-
currentDrawerTasks = tasks;
|
|
2897
|
-
|
|
2898
|
-
if (tasks.length === 0) {
|
|
2899
|
-
return `
|
|
2900
|
-
<div class="tab-empty-state">
|
|
2901
|
-
<div class="empty-icon"><i data-lucide="clipboard-list" class="w-12 h-12"></i></div>
|
|
2902
|
-
<div class="empty-title">${t('empty.noTasks')}</div>
|
|
2903
|
-
<div class="empty-text">${t('empty.noTasksText')}</div>
|
|
2904
|
-
</div>
|
|
2905
|
-
`;
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
return `
|
|
2909
|
-
<div class="tasks-tab-content">
|
|
2910
|
-
<div class="tasks-list" id="liteTasksListContent">
|
|
2911
|
-
${tasks.map(task => renderLiteTaskDetailItem(session.id, task)).join('')}
|
|
2912
|
-
</div>
|
|
2913
|
-
</div>
|
|
2914
|
-
`;
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
function renderLiteTaskDetailItem(sessionId, task) {
|
|
2918
|
-
const rawTask = task._raw || task;
|
|
2919
|
-
const taskJsonId = `task-json-${sessionId}-${task.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
2920
|
-
taskJsonStore[taskJsonId] = rawTask;
|
|
2921
|
-
|
|
2922
|
-
// Get preview info for lite tasks
|
|
2923
|
-
const action = rawTask.action || '';
|
|
2924
|
-
const scope = rawTask.scope || '';
|
|
2925
|
-
const modCount = rawTask.modification_points?.length || 0;
|
|
2926
|
-
const implCount = rawTask.implementation?.length || 0;
|
|
2927
|
-
const acceptCount = rawTask.acceptance?.length || 0;
|
|
2928
|
-
|
|
2929
|
-
// Escape for data attributes
|
|
2930
|
-
const safeSessionId = escapeHtml(sessionId);
|
|
2931
|
-
const safeTaskId = escapeHtml(task.id);
|
|
2932
|
-
|
|
2933
|
-
return `
|
|
2934
|
-
<div class="detail-task-item-full lite-task-item" data-session-id="${safeSessionId}" data-task-id="${safeTaskId}" style="cursor: pointer;" title="Click to view details">
|
|
2935
|
-
<div class="task-item-header-lite">
|
|
2936
|
-
<span class="task-id-badge">${escapeHtml(task.id)}</span>
|
|
2937
|
-
<span class="task-title">${escapeHtml(task.title || 'Untitled')}</span>
|
|
2938
|
-
<button class="btn-view-json" data-task-json-id="${taskJsonId}" data-task-display-id="${safeTaskId}">{ } JSON</button>
|
|
2939
|
-
</div>
|
|
2940
|
-
<div class="task-item-meta-lite">
|
|
2941
|
-
${action ? `<span class="meta-badge action">${escapeHtml(action)}</span>` : ''}
|
|
2942
|
-
${scope ? `<span class="meta-badge scope">${escapeHtml(scope)}</span>` : ''}
|
|
2943
|
-
${modCount > 0 ? `<span class="meta-badge mods">${modCount} mods</span>` : ''}
|
|
2944
|
-
${implCount > 0 ? `<span class="meta-badge impl">${implCount} steps</span>` : ''}
|
|
2945
|
-
${acceptCount > 0 ? `<span class="meta-badge accept">${acceptCount} acceptance</span>` : ''}
|
|
2946
|
-
</div>
|
|
2947
|
-
</div>
|
|
2948
|
-
`;
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
function getMetaPreviewForLite(task, rawTask) {
|
|
2952
|
-
const meta = task.meta || {};
|
|
2953
|
-
const parts = [];
|
|
2954
|
-
if (meta.type || rawTask.action) parts.push(meta.type || rawTask.action);
|
|
2955
|
-
if (meta.scope || rawTask.scope) parts.push(meta.scope || rawTask.scope);
|
|
2956
|
-
return parts.join(' | ') || 'No meta';
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
/**
|
|
2960
|
-
* Initialize click handlers for lite task items
|
|
2961
|
-
*/
|
|
2962
|
-
function initLiteTaskClickHandlers() {
|
|
2963
|
-
// Task item click handlers
|
|
2964
|
-
document.querySelectorAll('.lite-task-item').forEach(item => {
|
|
2965
|
-
if (!item._clickBound) {
|
|
2966
|
-
item._clickBound = true;
|
|
2967
|
-
item.addEventListener('click', function(e) {
|
|
2968
|
-
// Don't trigger if clicking on JSON button
|
|
2969
|
-
if (e.target.closest('.btn-view-json')) return;
|
|
2970
|
-
|
|
2971
|
-
const sessionId = this.dataset.sessionId;
|
|
2972
|
-
const taskId = this.dataset.taskId;
|
|
2973
|
-
openTaskDrawerForLite(sessionId, taskId);
|
|
2974
|
-
});
|
|
2975
|
-
}
|
|
2976
|
-
});
|
|
2977
|
-
|
|
2978
|
-
// JSON button click handlers
|
|
2979
|
-
document.querySelectorAll('.btn-view-json').forEach(btn => {
|
|
2980
|
-
if (!btn._clickBound) {
|
|
2981
|
-
btn._clickBound = true;
|
|
2982
|
-
btn.addEventListener('click', function(e) {
|
|
2983
|
-
e.stopPropagation();
|
|
2984
|
-
const taskJsonId = this.dataset.taskJsonId;
|
|
2985
|
-
const displayId = this.dataset.taskDisplayId;
|
|
2986
|
-
showJsonModal(taskJsonId, displayId);
|
|
2987
|
-
});
|
|
2988
|
-
}
|
|
2989
|
-
});
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
function openTaskDrawerForLite(sessionId, taskId) {
|
|
2993
|
-
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
2994
|
-
if (!session) return;
|
|
2995
|
-
|
|
2996
|
-
const task = session.tasks?.find(t => t.id === taskId);
|
|
2997
|
-
if (!task) return;
|
|
2998
|
-
|
|
2999
|
-
// Set current drawer tasks and session context
|
|
3000
|
-
currentDrawerTasks = session.tasks || [];
|
|
3001
|
-
window._currentDrawerSession = session;
|
|
3002
|
-
|
|
3003
|
-
document.getElementById('drawerTaskTitle').textContent = task.title || taskId;
|
|
3004
|
-
// Use dedicated lite task drawer renderer
|
|
3005
|
-
document.getElementById('drawerContent').innerHTML = renderLiteTaskDrawerContent(task, session);
|
|
3006
|
-
document.getElementById('taskDetailDrawer').classList.add('open');
|
|
3007
|
-
document.getElementById('drawerOverlay').classList.add('active');
|
|
3008
|
-
}
|
|
3009
|
-
|
|
3010
|
-
function renderLitePlanTab(session) {
|
|
3011
|
-
const plan = session.plan;
|
|
3012
|
-
const isFixPlan = session.type === 'lite-fix';
|
|
3013
|
-
|
|
3014
|
-
if (!plan) {
|
|
3015
|
-
return `
|
|
3016
|
-
<div class="tab-empty-state">
|
|
3017
|
-
<div class="empty-icon"><i data-lucide="ruler" class="w-12 h-12"></i></div>
|
|
3018
|
-
<div class="empty-title">No Plan Data</div>
|
|
3019
|
-
<div class="empty-text">No ${isFixPlan ? 'fix-plan.json' : 'plan.json'} found for this session.</div>
|
|
3020
|
-
</div>
|
|
3021
|
-
`;
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
return `
|
|
3025
|
-
<div class="plan-tab-content">
|
|
3026
|
-
<!-- Summary -->
|
|
3027
|
-
${plan.summary ? `
|
|
3028
|
-
<div class="plan-section">
|
|
3029
|
-
<h4 class="plan-section-title"><i data-lucide="clipboard-list" class="w-4 h-4 inline mr-1"></i> Summary</h4>
|
|
3030
|
-
<p class="plan-summary-text">${escapeHtml(plan.summary)}</p>
|
|
3031
|
-
</div>
|
|
3032
|
-
` : ''}
|
|
3033
|
-
|
|
3034
|
-
<!-- Root Cause (fix-plan specific) -->
|
|
3035
|
-
${plan.root_cause ? `
|
|
3036
|
-
<div class="plan-section">
|
|
3037
|
-
<h4 class="plan-section-title"><i data-lucide="search" class="w-4 h-4 inline mr-1"></i> Root Cause</h4>
|
|
3038
|
-
<p class="plan-root-cause-text">${escapeHtml(plan.root_cause)}</p>
|
|
3039
|
-
</div>
|
|
3040
|
-
` : ''}
|
|
3041
|
-
|
|
3042
|
-
<!-- Strategy (fix-plan specific) -->
|
|
3043
|
-
${plan.strategy ? `
|
|
3044
|
-
<div class="plan-section">
|
|
3045
|
-
<h4 class="plan-section-title"><i data-lucide="route" class="w-4 h-4 inline mr-1"></i> Fix Strategy</h4>
|
|
3046
|
-
<p class="plan-strategy-text">${escapeHtml(plan.strategy)}</p>
|
|
3047
|
-
</div>
|
|
3048
|
-
` : ''}
|
|
3049
|
-
|
|
3050
|
-
<!-- Approach -->
|
|
3051
|
-
${plan.approach ? `
|
|
3052
|
-
<div class="plan-section">
|
|
3053
|
-
<h4 class="plan-section-title"><i data-lucide="target" class="w-4 h-4 inline mr-1"></i> Approach</h4>
|
|
3054
|
-
<p class="plan-approach-text">${escapeHtml(plan.approach)}</p>
|
|
3055
|
-
</div>
|
|
3056
|
-
` : ''}
|
|
3057
|
-
|
|
3058
|
-
<!-- User Requirements (fix-plan specific) -->
|
|
3059
|
-
${plan.user_requirements ? `
|
|
3060
|
-
<div class="plan-section">
|
|
3061
|
-
<h4 class="plan-section-title"><i data-lucide="user" class="w-4 h-4 inline mr-1"></i> User Requirements</h4>
|
|
3062
|
-
<p class="plan-requirements-text">${escapeHtml(plan.user_requirements)}</p>
|
|
3063
|
-
</div>
|
|
3064
|
-
` : ''}
|
|
3065
|
-
|
|
3066
|
-
<!-- Focus Paths -->
|
|
3067
|
-
${plan.focus_paths?.length ? `
|
|
3068
|
-
<div class="plan-section">
|
|
3069
|
-
<h4 class="plan-section-title"><i data-lucide="folder" class="w-4 h-4 inline mr-1"></i> Focus Paths</h4>
|
|
3070
|
-
<div class="path-tags">
|
|
3071
|
-
${plan.focus_paths.map(p => `<span class="path-tag">${escapeHtml(p)}</span>`).join('')}
|
|
3072
|
-
</div>
|
|
3073
|
-
</div>
|
|
3074
|
-
` : ''}
|
|
3075
|
-
|
|
3076
|
-
<!-- Metadata -->
|
|
3077
|
-
<div class="plan-section">
|
|
3078
|
-
<h4 class="plan-section-title"><i data-lucide="info" class="w-4 h-4 inline mr-1"></i> Metadata</h4>
|
|
3079
|
-
<div class="plan-meta-grid">
|
|
3080
|
-
${plan.severity ? `<div class="meta-item"><span class="meta-label">Severity:</span> <span class="severity-badge ${escapeHtml(plan.severity)}">${escapeHtml(plan.severity)}</span></div>` : ''}
|
|
3081
|
-
${plan.risk_level ? `<div class="meta-item"><span class="meta-label">Risk Level:</span> <span class="risk-badge ${escapeHtml(plan.risk_level)}">${escapeHtml(plan.risk_level)}</span></div>` : ''}
|
|
3082
|
-
${plan.estimated_time ? `<div class="meta-item"><span class="meta-label">Estimated Time:</span> ${escapeHtml(plan.estimated_time)}</div>` : ''}
|
|
3083
|
-
${plan.complexity ? `<div class="meta-item"><span class="meta-label">Complexity:</span> ${escapeHtml(plan.complexity)}</div>` : ''}
|
|
3084
|
-
${plan.recommended_execution ? `<div class="meta-item"><span class="meta-label">Execution:</span> ${escapeHtml(plan.recommended_execution)}</div>` : ''}
|
|
3085
|
-
</div>
|
|
3086
|
-
</div>
|
|
3087
|
-
|
|
3088
|
-
<!-- Fix Tasks Summary (fix-plan specific) -->
|
|
3089
|
-
${plan.tasks?.length ? `
|
|
3090
|
-
<div class="plan-section">
|
|
3091
|
-
<h4 class="plan-section-title"><i data-lucide="list-checks" class="w-4 h-4 inline mr-1"></i> Fix Tasks (${plan.tasks.length})</h4>
|
|
3092
|
-
<div class="fix-tasks-summary">
|
|
3093
|
-
${plan.tasks.map((task, idx) => `
|
|
3094
|
-
<div class="fix-task-summary-item collapsible-section">
|
|
3095
|
-
<div class="collapsible-header">
|
|
3096
|
-
<span class="collapse-icon">▶</span>
|
|
3097
|
-
<span class="task-num">#${idx + 1}</span>
|
|
3098
|
-
<span class="task-title-brief">${escapeHtml(task.title || task.summary || 'Untitled')}</span>
|
|
3099
|
-
${task.scope ? `<span class="task-scope-badge">${escapeHtml(task.scope)}</span>` : ''}
|
|
3100
|
-
</div>
|
|
3101
|
-
<div class="collapsible-content collapsed">
|
|
3102
|
-
${task.modification_points?.length ? `
|
|
3103
|
-
<div class="task-detail-section">
|
|
3104
|
-
<strong>Modification Points:</strong>
|
|
3105
|
-
<ul class="mod-points-list">
|
|
3106
|
-
${task.modification_points.map(mp => `
|
|
3107
|
-
<li>
|
|
3108
|
-
<code>${escapeHtml(mp.file || '')}</code>
|
|
3109
|
-
${mp.function_name ? `<span class="func-name">→ ${escapeHtml(mp.function_name)}</span>` : ''}
|
|
3110
|
-
${mp.change_type ? `<span class="change-type">(${escapeHtml(mp.change_type)})</span>` : ''}
|
|
3111
|
-
</li>
|
|
3112
|
-
`).join('')}
|
|
3113
|
-
</ul>
|
|
3114
|
-
</div>
|
|
3115
|
-
` : ''}
|
|
3116
|
-
${task.implementation?.length ? `
|
|
3117
|
-
<div class="task-detail-section">
|
|
3118
|
-
<strong>Implementation Steps:</strong>
|
|
3119
|
-
<ol class="impl-steps-list">
|
|
3120
|
-
${task.implementation.map(step => `<li>${escapeHtml(step)}</li>`).join('')}
|
|
3121
|
-
</ol>
|
|
3122
|
-
</div>
|
|
3123
|
-
` : ''}
|
|
3124
|
-
${task.verification?.length ? `
|
|
3125
|
-
<div class="task-detail-section">
|
|
3126
|
-
<strong>Verification:</strong>
|
|
3127
|
-
<ul class="verify-list">
|
|
3128
|
-
${task.verification.map(v => `<li>${escapeHtml(v)}</li>`).join('')}
|
|
3129
|
-
</ul>
|
|
3130
|
-
</div>
|
|
3131
|
-
` : ''}
|
|
3132
|
-
</div>
|
|
3133
|
-
</div>
|
|
3134
|
-
`).join('')}
|
|
3135
|
-
</div>
|
|
3136
|
-
</div>
|
|
3137
|
-
` : ''}
|
|
3138
|
-
|
|
3139
|
-
<!-- Raw JSON -->
|
|
3140
|
-
<div class="plan-section collapsible-section">
|
|
3141
|
-
<div class="collapsible-header">
|
|
3142
|
-
<span class="collapse-icon">▶</span>
|
|
3143
|
-
<span class="section-label">{ } Raw JSON</span>
|
|
3144
|
-
</div>
|
|
3145
|
-
<div class="collapsible-content collapsed">
|
|
3146
|
-
<pre class="json-content">${escapeHtml(JSON.stringify(plan, null, 2))}</pre>
|
|
3147
|
-
</div>
|
|
3148
|
-
</div>
|
|
3149
|
-
</div>
|
|
3150
|
-
`;
|
|
3151
|
-
}
|
|
3152
|
-
|
|
3153
|
-
async function loadAndRenderLiteContextTab(session, contentArea) {
|
|
3154
|
-
contentArea.innerHTML = '<div class="tab-loading">Loading context data...</div>';
|
|
3155
|
-
|
|
3156
|
-
try {
|
|
3157
|
-
if (window.SERVER_MODE && session.path) {
|
|
3158
|
-
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=context`);
|
|
3159
|
-
if (response.ok) {
|
|
3160
|
-
const data = await response.json();
|
|
3161
|
-
contentArea.innerHTML = renderLiteContextContent(data.context, data.explorations, session, data.diagnoses);
|
|
3162
|
-
|
|
3163
|
-
// Re-initialize collapsible sections for explorations and diagnoses (scoped to contentArea)
|
|
3164
|
-
initCollapsibleSections(contentArea);
|
|
3165
|
-
return;
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
3168
|
-
// Fallback: show plan context if available
|
|
3169
|
-
contentArea.innerHTML = renderLiteContextContent(null, null, session, null);
|
|
3170
|
-
initCollapsibleSections(contentArea);
|
|
3171
|
-
} catch (err) {
|
|
3172
|
-
contentArea.innerHTML = `<div class="tab-error">Failed to load context: ${err.message}</div>`;
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
async function loadAndRenderLiteSummaryTab(session, contentArea) {
|
|
3177
|
-
contentArea.innerHTML = '<div class="tab-loading">Loading summaries...</div>';
|
|
3178
|
-
|
|
3179
|
-
try {
|
|
3180
|
-
if (window.SERVER_MODE && session.path) {
|
|
3181
|
-
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=summary`);
|
|
3182
|
-
if (response.ok) {
|
|
3183
|
-
const data = await response.json();
|
|
3184
|
-
// Prioritize .summaries/ directory content
|
|
3185
|
-
if (data.summaries?.length) {
|
|
3186
|
-
contentArea.innerHTML = renderSummaryContent(data.summaries);
|
|
3187
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3188
|
-
return;
|
|
3189
|
-
}
|
|
3190
|
-
// Fallback to plan.json summary field
|
|
3191
|
-
if (data.summary) {
|
|
3192
|
-
contentArea.innerHTML = renderSummaryContent([{ name: 'Summary', content: data.summary }]);
|
|
3193
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3194
|
-
return;
|
|
3195
|
-
}
|
|
3196
|
-
}
|
|
3197
|
-
}
|
|
3198
|
-
|
|
3199
|
-
// Fallback: try to get summary from session object (plan.summary or synthesis.convergence.summary)
|
|
3200
|
-
const plan = session.plan || {};
|
|
3201
|
-
const synthesis = session.latestSynthesis || session.discussionTopic || {};
|
|
3202
|
-
const summaryText = plan.summary || synthesis.convergence?.summary;
|
|
3203
|
-
|
|
3204
|
-
if (summaryText) {
|
|
3205
|
-
contentArea.innerHTML = renderSummaryContent([{ name: 'Summary', content: summaryText }]);
|
|
3206
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3207
|
-
return;
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
// No summary available
|
|
3211
|
-
contentArea.innerHTML = `
|
|
3212
|
-
<div class="tab-empty-state">
|
|
3213
|
-
<div class="empty-icon"><i data-lucide="file-text" class="w-12 h-12"></i></div>
|
|
3214
|
-
<div class="empty-title">${t('empty.noSummary') || 'No Summary'}</div>
|
|
3215
|
-
<div class="empty-text">${t('empty.noSummaryText') || 'No summary available for this session.'}</div>
|
|
3216
|
-
</div>
|
|
3217
|
-
`;
|
|
3218
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3219
|
-
} catch (err) {
|
|
3220
|
-
contentArea.innerHTML = `<div class="tab-error">Failed to load summaries: ${err.message}</div>`;
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3224
|
-
// ============================================
|
|
3225
|
-
// DIAGNOSES TAB RENDERING (lite-fix specific)
|
|
3226
|
-
// ============================================
|
|
3227
|
-
|
|
3228
|
-
function renderDiagnosesTab(session) {
|
|
3229
|
-
const diagnoses = session.diagnoses;
|
|
3230
|
-
|
|
3231
|
-
if (!diagnoses || (!diagnoses.manifest && diagnoses.items?.length === 0)) {
|
|
3232
|
-
return `
|
|
3233
|
-
<div class="tab-empty-state">
|
|
3234
|
-
<div class="empty-icon"><i data-lucide="stethoscope" class="w-12 h-12"></i></div>
|
|
3235
|
-
<div class="empty-title">${t('empty.noDiagnoses')}</div>
|
|
3236
|
-
<div class="empty-text">${t('empty.noDiagnosesText')}</div>
|
|
3237
|
-
</div>
|
|
3238
|
-
`;
|
|
3239
|
-
}
|
|
3240
|
-
|
|
3241
|
-
let sections = [];
|
|
3242
|
-
|
|
3243
|
-
// Manifest summary (if available)
|
|
3244
|
-
if (diagnoses.manifest) {
|
|
3245
|
-
sections.push(`
|
|
3246
|
-
<div class="diagnoses-manifest-section">
|
|
3247
|
-
<h4 class="diagnoses-section-title"><i data-lucide="clipboard-check" class="w-4 h-4 inline mr-1"></i> Diagnosis Summary</h4>
|
|
3248
|
-
<div class="manifest-meta-grid">
|
|
3249
|
-
${diagnoses.manifest.total_diagnoses ? `<div class="meta-item"><span class="meta-label">Total Diagnoses:</span> ${diagnoses.manifest.total_diagnoses}</div>` : ''}
|
|
3250
|
-
${diagnoses.manifest.diagnosis_angles ? `<div class="meta-item"><span class="meta-label">Angles:</span> ${diagnoses.manifest.diagnosis_angles.join(', ')}</div>` : ''}
|
|
3251
|
-
${diagnoses.manifest.created_at ? `<div class="meta-item"><span class="meta-label">Created:</span> ${formatDate(diagnoses.manifest.created_at)}</div>` : ''}
|
|
3252
|
-
</div>
|
|
3253
|
-
</div>
|
|
3254
|
-
`);
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
// Individual diagnosis items
|
|
3258
|
-
if (diagnoses.items && diagnoses.items.length > 0) {
|
|
3259
|
-
const diagnosisCards = diagnoses.items.map((diag) => {
|
|
3260
|
-
return renderDiagnosisCard(diag);
|
|
3261
|
-
}).join('');
|
|
3262
|
-
sections.push(`
|
|
3263
|
-
<div class="diagnoses-items-section">
|
|
3264
|
-
<h4 class="diagnoses-section-title"><i data-lucide="search" class="w-4 h-4 inline mr-1"></i> Diagnosis Details (${diagnoses.items.length})</h4>
|
|
3265
|
-
<div class="diagnoses-grid">
|
|
3266
|
-
${diagnosisCards}
|
|
3267
|
-
</div>
|
|
3268
|
-
</div>
|
|
3269
|
-
`);
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
|
-
return `<div class="diagnoses-tab-content">${sections.join('')}</div>`;
|
|
3273
|
-
}
|
|
3274
|
-
|
|
3275
|
-
function renderDiagnosisCard(diag) {
|
|
3276
|
-
const diagJsonId = `diag-json-${diag.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
3277
|
-
taskJsonStore[diagJsonId] = diag;
|
|
3278
|
-
|
|
3279
|
-
return `
|
|
3280
|
-
<div class="diagnosis-card collapsible-section">
|
|
3281
|
-
<div class="collapsible-header diagnosis-header">
|
|
3282
|
-
<span class="collapse-icon">▶</span>
|
|
3283
|
-
<span class="diagnosis-id"><i data-lucide="file-search" class="w-4 h-4 inline mr-1"></i>${escapeHtml(diag.id)}</span>
|
|
3284
|
-
<button class="btn-view-json" onclick="event.stopPropagation(); showJsonModal('${diagJsonId}', '${escapeHtml(diag.id)}')">{ } JSON</button>
|
|
3285
|
-
</div>
|
|
3286
|
-
<div class="collapsible-content collapsed">
|
|
3287
|
-
${renderDiagnosisContent(diag)}
|
|
3288
|
-
</div>
|
|
3289
|
-
</div>
|
|
3290
|
-
`;
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
function renderDiagnosisContent(diag) {
|
|
3294
|
-
let content = [];
|
|
3295
|
-
|
|
3296
|
-
// Symptom (for detailed diagnosis structure)
|
|
3297
|
-
if (diag.symptom) {
|
|
3298
|
-
const symptom = diag.symptom;
|
|
3299
|
-
content.push(`
|
|
3300
|
-
<div class="diag-section">
|
|
3301
|
-
<strong>Symptom:</strong>
|
|
3302
|
-
${symptom.description ? `<p>${escapeHtml(symptom.description)}</p>` : ''}
|
|
3303
|
-
${symptom.user_impact ? `<div class="symptom-impact"><strong>User Impact:</strong> ${escapeHtml(symptom.user_impact)}</div>` : ''}
|
|
3304
|
-
${symptom.frequency ? `<div class="symptom-freq"><strong>Frequency:</strong> <span class="badge">${escapeHtml(symptom.frequency)}</span></div>` : ''}
|
|
3305
|
-
${symptom.error_message ? `<div class="symptom-error"><strong>Error:</strong> <code>${escapeHtml(symptom.error_message)}</code></div>` : ''}
|
|
3306
|
-
</div>
|
|
3307
|
-
`);
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
|
-
// Summary/Overview (for simple diagnosis structure)
|
|
3311
|
-
if (diag.summary || diag.overview) {
|
|
3312
|
-
content.push(`
|
|
3313
|
-
<div class="diag-section">
|
|
3314
|
-
<strong>Summary:</strong>
|
|
3315
|
-
<p>${escapeHtml(diag.summary || diag.overview)}</p>
|
|
3316
|
-
</div>
|
|
3317
|
-
`);
|
|
3318
|
-
}
|
|
3319
|
-
|
|
3320
|
-
// Root Cause Analysis
|
|
3321
|
-
if (diag.root_cause) {
|
|
3322
|
-
const rootCause = diag.root_cause;
|
|
3323
|
-
// Handle both object and string formats
|
|
3324
|
-
if (typeof rootCause === 'object') {
|
|
3325
|
-
content.push(`
|
|
3326
|
-
<div class="diag-section">
|
|
3327
|
-
<strong>Root Cause:</strong>
|
|
3328
|
-
${rootCause.file ? `<div class="rc-file"><strong>File:</strong> <code>${escapeHtml(rootCause.file)}</code></div>` : ''}
|
|
3329
|
-
${rootCause.line_range ? `<div class="rc-line"><strong>Lines:</strong> ${escapeHtml(rootCause.line_range)}</div>` : ''}
|
|
3330
|
-
${rootCause.function ? `<div class="rc-func"><strong>Function:</strong> <code>${escapeHtml(rootCause.function)}</code></div>` : ''}
|
|
3331
|
-
${rootCause.issue ? `<p>${escapeHtml(rootCause.issue)}</p>` : ''}
|
|
3332
|
-
${rootCause.confidence ? `<div class="rc-confidence"><strong>Confidence:</strong> ${(rootCause.confidence * 100).toFixed(0)}%</div>` : ''}
|
|
3333
|
-
${rootCause.category ? `<div class="rc-category"><strong>Category:</strong> <span class="badge">${escapeHtml(rootCause.category)}</span></div>` : ''}
|
|
3334
|
-
</div>
|
|
3335
|
-
`);
|
|
3336
|
-
} else if (typeof rootCause === 'string') {
|
|
3337
|
-
content.push(`
|
|
3338
|
-
<div class="diag-section">
|
|
3339
|
-
<strong>Root Cause:</strong>
|
|
3340
|
-
<p>${escapeHtml(rootCause)}</p>
|
|
3341
|
-
</div>
|
|
3342
|
-
`);
|
|
3343
|
-
}
|
|
3344
|
-
} else if (diag.root_cause_analysis) {
|
|
3345
|
-
content.push(`
|
|
3346
|
-
<div class="diag-section">
|
|
3347
|
-
<strong>Root Cause:</strong>
|
|
3348
|
-
<p>${escapeHtml(diag.root_cause_analysis)}</p>
|
|
3349
|
-
</div>
|
|
3350
|
-
`);
|
|
3351
|
-
}
|
|
3352
|
-
|
|
3353
|
-
// Issues/Findings
|
|
3354
|
-
if (diag.issues && Array.isArray(diag.issues)) {
|
|
3355
|
-
content.push(`
|
|
3356
|
-
<div class="diag-section">
|
|
3357
|
-
<strong>Issues Found (${diag.issues.length}):</strong>
|
|
3358
|
-
<ul class="issues-list">
|
|
3359
|
-
${diag.issues.map(issue => `
|
|
3360
|
-
<li class="issue-item">
|
|
3361
|
-
${typeof issue === 'string' ? escapeHtml(issue) : `
|
|
3362
|
-
<div class="issue-title">${escapeHtml(issue.title || issue.description || 'Unknown')}</div>
|
|
3363
|
-
${issue.location ? `<div class="issue-location"><code>${escapeHtml(issue.location)}</code></div>` : ''}
|
|
3364
|
-
${issue.severity ? `<span class="severity-badge ${issue.severity}">${escapeHtml(issue.severity)}</span>` : ''}
|
|
3365
|
-
`}
|
|
3366
|
-
</li>
|
|
3367
|
-
`).join('')}
|
|
3368
|
-
</ul>
|
|
3369
|
-
</div>
|
|
3370
|
-
`);
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
// Affected Files
|
|
3374
|
-
if (diag.affected_files && Array.isArray(diag.affected_files)) {
|
|
3375
|
-
content.push(`
|
|
3376
|
-
<div class="diag-section">
|
|
3377
|
-
<strong>Affected Files:</strong>
|
|
3378
|
-
<div class="path-tags">
|
|
3379
|
-
${diag.affected_files.map(f => `<span class="path-tag">${escapeHtml(typeof f === 'string' ? f : f.path || f.file)}</span>`).join('')}
|
|
3380
|
-
</div>
|
|
3381
|
-
</div>
|
|
3382
|
-
`);
|
|
3383
|
-
}
|
|
3384
|
-
|
|
3385
|
-
// API Contracts (for api-contracts diagnosis)
|
|
3386
|
-
if (diag.contracts && Array.isArray(diag.contracts)) {
|
|
3387
|
-
content.push(`
|
|
3388
|
-
<div class="diag-section">
|
|
3389
|
-
<strong>API Contracts (${diag.contracts.length}):</strong>
|
|
3390
|
-
<div class="contracts-list">
|
|
3391
|
-
${diag.contracts.map(contract => `
|
|
3392
|
-
<div class="contract-item">
|
|
3393
|
-
<div class="contract-header">
|
|
3394
|
-
<span class="contract-endpoint">${escapeHtml(contract.endpoint || contract.name || 'Unknown')}</span>
|
|
3395
|
-
${contract.method ? `<span class="contract-method">${escapeHtml(contract.method)}</span>` : ''}
|
|
3396
|
-
</div>
|
|
3397
|
-
${contract.description ? `<div class="contract-desc">${escapeHtml(contract.description)}</div>` : ''}
|
|
3398
|
-
${contract.issues?.length ? `<div class="contract-issues">${contract.issues.length} issue(s)</div>` : ''}
|
|
3399
|
-
</div>
|
|
3400
|
-
`).join('')}
|
|
3401
|
-
</div>
|
|
3402
|
-
</div>
|
|
3403
|
-
`);
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
// Dataflow Analysis (for dataflow diagnosis)
|
|
3407
|
-
if (diag.dataflow || diag.data_flow) {
|
|
3408
|
-
const df = diag.dataflow || diag.data_flow;
|
|
3409
|
-
content.push(`
|
|
3410
|
-
<div class="diag-section">
|
|
3411
|
-
<strong>Data Flow Analysis:</strong>
|
|
3412
|
-
${typeof df === 'string' ? `<p>${escapeHtml(df)}</p>` : `
|
|
3413
|
-
<div class="dataflow-details">
|
|
3414
|
-
${df.source ? `<div class="df-item"><span class="df-label">Source:</span> ${escapeHtml(df.source)}</div>` : ''}
|
|
3415
|
-
${df.sink ? `<div class="df-item"><span class="df-label">Sink:</span> ${escapeHtml(df.sink)}</div>` : ''}
|
|
3416
|
-
${df.transformations?.length ? `
|
|
3417
|
-
<div class="df-item">
|
|
3418
|
-
<span class="df-label">Transformations:</span>
|
|
3419
|
-
<ol class="df-transforms">${df.transformations.map(t => `<li>${escapeHtml(t)}</li>`).join('')}</ol>
|
|
3420
|
-
</div>
|
|
3421
|
-
` : ''}
|
|
3422
|
-
</div>
|
|
3423
|
-
`}
|
|
3424
|
-
</div>
|
|
3425
|
-
`);
|
|
3426
|
-
}
|
|
3427
|
-
|
|
3428
|
-
// Reproduction Steps
|
|
3429
|
-
if (diag.reproduction_steps && Array.isArray(diag.reproduction_steps)) {
|
|
3430
|
-
content.push(`
|
|
3431
|
-
<div class="diag-section">
|
|
3432
|
-
<strong>Reproduction Steps:</strong>
|
|
3433
|
-
<ol class="repro-steps-list">
|
|
3434
|
-
${diag.reproduction_steps.map(step => `<li>${escapeHtml(step)}</li>`).join('')}
|
|
3435
|
-
</ol>
|
|
3436
|
-
</div>
|
|
3437
|
-
`);
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
// Fix Hints
|
|
3441
|
-
if (diag.fix_hints && Array.isArray(diag.fix_hints)) {
|
|
3442
|
-
content.push(`
|
|
3443
|
-
<div class="diag-section">
|
|
3444
|
-
<strong>Fix Hints (${diag.fix_hints.length}):</strong>
|
|
3445
|
-
<div class="fix-hints-list">
|
|
3446
|
-
${diag.fix_hints.map((hint, idx) => `
|
|
3447
|
-
<div class="fix-hint-item">
|
|
3448
|
-
<div class="hint-header"><strong>Hint ${idx + 1}:</strong> ${escapeHtml(hint.description || 'No description')}</div>
|
|
3449
|
-
${hint.approach ? `<div class="hint-approach"><strong>Approach:</strong> ${escapeHtml(hint.approach)}</div>` : ''}
|
|
3450
|
-
${hint.risk ? `<div class="hint-risk"><strong>Risk:</strong> <span class="badge risk-${hint.risk}">${escapeHtml(hint.risk)}</span></div>` : ''}
|
|
3451
|
-
${hint.code_example ? `<div class="hint-code"><strong>Code Example:</strong><pre><code>${escapeHtml(hint.code_example)}</code></pre></div>` : ''}
|
|
3452
|
-
</div>
|
|
3453
|
-
`).join('')}
|
|
3454
|
-
</div>
|
|
3455
|
-
</div>
|
|
3456
|
-
`);
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
// Recommendations
|
|
3460
|
-
if (diag.recommendations && Array.isArray(diag.recommendations)) {
|
|
3461
|
-
content.push(`
|
|
3462
|
-
<div class="diag-section">
|
|
3463
|
-
<strong>Recommendations:</strong>
|
|
3464
|
-
<ol class="recommendations-list">
|
|
3465
|
-
${diag.recommendations.map(rec => `<li>${escapeHtml(typeof rec === 'string' ? rec : rec.description || rec.action)}</li>`).join('')}
|
|
3466
|
-
</ol>
|
|
3467
|
-
</div>
|
|
3468
|
-
`);
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
|
-
// Dependencies
|
|
3472
|
-
if (diag.dependencies && typeof diag.dependencies === 'string') {
|
|
3473
|
-
content.push(`
|
|
3474
|
-
<div class="diag-section">
|
|
3475
|
-
<strong>Dependencies:</strong>
|
|
3476
|
-
<p>${escapeHtml(diag.dependencies)}</p>
|
|
3477
|
-
</div>
|
|
3478
|
-
`);
|
|
3479
|
-
}
|
|
3480
|
-
|
|
3481
|
-
// Constraints
|
|
3482
|
-
if (diag.constraints && typeof diag.constraints === 'string') {
|
|
3483
|
-
content.push(`
|
|
3484
|
-
<div class="diag-section">
|
|
3485
|
-
<strong>Constraints:</strong>
|
|
3486
|
-
<p>${escapeHtml(diag.constraints)}</p>
|
|
3487
|
-
</div>
|
|
3488
|
-
`);
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
// Clarification Needs
|
|
3492
|
-
if (diag.clarification_needs && Array.isArray(diag.clarification_needs)) {
|
|
3493
|
-
content.push(`
|
|
3494
|
-
<div class="diag-section">
|
|
3495
|
-
<strong>Clarification Needs:</strong>
|
|
3496
|
-
<div class="clarification-list">
|
|
3497
|
-
${diag.clarification_needs.map(clar => `
|
|
3498
|
-
<div class="clarification-item">
|
|
3499
|
-
<div class="clar-question"><strong>Q:</strong> ${escapeHtml(clar.question)}</div>
|
|
3500
|
-
${clar.context ? `<div class="clar-context"><strong>Context:</strong> ${escapeHtml(clar.context)}</div>` : ''}
|
|
3501
|
-
${clar.options && Array.isArray(clar.options) ? `
|
|
3502
|
-
<div class="clar-options">
|
|
3503
|
-
<strong>Options:</strong>
|
|
3504
|
-
<ul>
|
|
3505
|
-
${clar.options.map(opt => `<li>${escapeHtml(opt)}</li>`).join('')}
|
|
3506
|
-
</ul>
|
|
3507
|
-
</div>
|
|
3508
|
-
` : ''}
|
|
3509
|
-
</div>
|
|
3510
|
-
`).join('')}
|
|
3511
|
-
</div>
|
|
3512
|
-
</div>
|
|
3513
|
-
`);
|
|
3514
|
-
}
|
|
3515
|
-
|
|
3516
|
-
// Related Issues
|
|
3517
|
-
if (diag.related_issues && Array.isArray(diag.related_issues)) {
|
|
3518
|
-
content.push(`
|
|
3519
|
-
<div class="diag-section">
|
|
3520
|
-
<strong>Related Issues:</strong>
|
|
3521
|
-
<ul class="related-issues-list">
|
|
3522
|
-
${diag.related_issues.map(issue => `
|
|
3523
|
-
<li>
|
|
3524
|
-
${issue.type ? `<span class="issue-type-badge">${escapeHtml(issue.type)}</span>` : ''}
|
|
3525
|
-
${issue.reference ? `<strong>${escapeHtml(issue.reference)}</strong>: ` : ''}
|
|
3526
|
-
${issue.description ? escapeHtml(issue.description) : ''}
|
|
3527
|
-
</li>
|
|
3528
|
-
`).join('')}
|
|
3529
|
-
</ul>
|
|
3530
|
-
</div>
|
|
3531
|
-
`);
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
|
-
// If no specific content was rendered, show raw JSON preview
|
|
3535
|
-
if (content.length === 0) {
|
|
3536
|
-
console.warn('[DEBUG] No content rendered for diagnosis:', diag);
|
|
3537
|
-
content.push(`
|
|
3538
|
-
<div class="diag-section">
|
|
3539
|
-
<strong>Debug: Raw JSON</strong>
|
|
3540
|
-
<pre class="json-content">${escapeHtml(JSON.stringify(diag, null, 2))}</pre>
|
|
3541
|
-
</div>
|
|
3542
|
-
`);
|
|
3543
|
-
}
|
|
3544
|
-
|
|
3545
|
-
return content.join('');
|
|
3546
|
-
}
|