claude-code-workflow 6.3.53 → 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 +358 -188
- 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 +666 -0
- 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 -904
- 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 +102 -92
- 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 -691
- 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 -667
- 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/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,3248 +0,0 @@
|
|
|
1
|
-
// ==========================================
|
|
2
|
-
// ISSUE MANAGER VIEW
|
|
3
|
-
// Manages issues, solutions, and execution queue
|
|
4
|
-
// ==========================================
|
|
5
|
-
|
|
6
|
-
// ========== Issue State ==========
|
|
7
|
-
var issueData = {
|
|
8
|
-
issues: [],
|
|
9
|
-
historyIssues: [], // Archived/completed issues from history
|
|
10
|
-
queue: { tasks: [], solutions: [], conflicts: [], execution_groups: [], grouped_items: {} },
|
|
11
|
-
selectedIssue: null,
|
|
12
|
-
selectedSolution: null,
|
|
13
|
-
selectedSolutionIssueId: null,
|
|
14
|
-
statusFilter: 'all',
|
|
15
|
-
searchQuery: '',
|
|
16
|
-
viewMode: 'issues', // 'issues' | 'queue'
|
|
17
|
-
// Search suggestions state
|
|
18
|
-
searchSuggestions: [],
|
|
19
|
-
showSuggestions: false,
|
|
20
|
-
selectedSuggestion: -1
|
|
21
|
-
};
|
|
22
|
-
var issueLoading = false;
|
|
23
|
-
var issueDragState = {
|
|
24
|
-
dragging: null,
|
|
25
|
-
groupId: null
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// Multi-queue state
|
|
29
|
-
var queueData = {
|
|
30
|
-
queues: [], // All queue index entries
|
|
31
|
-
activeQueueId: null, // Currently active queue
|
|
32
|
-
expandedQueueId: null // Queue showing execution groups
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// ========== Main Render Function ==========
|
|
36
|
-
async function renderIssueManager() {
|
|
37
|
-
const container = document.getElementById('mainContent');
|
|
38
|
-
if (!container) return;
|
|
39
|
-
|
|
40
|
-
// Hide stats grid and search
|
|
41
|
-
hideStatsAndCarousel();
|
|
42
|
-
|
|
43
|
-
// Show loading state
|
|
44
|
-
container.innerHTML = '<div class="issue-manager loading">' +
|
|
45
|
-
'<div class="loading-spinner"><i data-lucide="loader-2" class="w-8 h-8 animate-spin"></i></div>' +
|
|
46
|
-
'<p>' + t('common.loading') + '</p>' +
|
|
47
|
-
'</div>';
|
|
48
|
-
|
|
49
|
-
// Load data
|
|
50
|
-
await Promise.all([loadIssueData(), loadQueueData(), loadAllQueues()]);
|
|
51
|
-
|
|
52
|
-
// Render the main view
|
|
53
|
-
renderIssueView();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// ========== Data Loading ==========
|
|
57
|
-
async function loadIssueData() {
|
|
58
|
-
issueLoading = true;
|
|
59
|
-
try {
|
|
60
|
-
const response = await fetch('/api/issues?path=' + encodeURIComponent(projectPath));
|
|
61
|
-
if (!response.ok) throw new Error('Failed to load issues');
|
|
62
|
-
const data = await response.json();
|
|
63
|
-
issueData.issues = data.issues || [];
|
|
64
|
-
updateIssueBadge();
|
|
65
|
-
} catch (err) {
|
|
66
|
-
console.error('Failed to load issues:', err);
|
|
67
|
-
issueData.issues = [];
|
|
68
|
-
} finally {
|
|
69
|
-
issueLoading = false;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async function loadIssueHistory() {
|
|
74
|
-
try {
|
|
75
|
-
const response = await fetch('/api/issues/history?path=' + encodeURIComponent(projectPath));
|
|
76
|
-
if (!response.ok) throw new Error('Failed to load issue history');
|
|
77
|
-
const data = await response.json();
|
|
78
|
-
issueData.historyIssues = data.issues || [];
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.error('Failed to load issue history:', err);
|
|
81
|
-
issueData.historyIssues = [];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async function loadQueueData() {
|
|
86
|
-
try {
|
|
87
|
-
const response = await fetch('/api/queue?path=' + encodeURIComponent(projectPath));
|
|
88
|
-
if (!response.ok) throw new Error('Failed to load queue');
|
|
89
|
-
issueData.queue = await response.json();
|
|
90
|
-
} catch (err) {
|
|
91
|
-
console.error('Failed to load queue:', err);
|
|
92
|
-
issueData.queue = { tasks: [], solutions: [], conflicts: [], execution_groups: [], grouped_items: {} };
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async function loadAllQueues() {
|
|
97
|
-
try {
|
|
98
|
-
const response = await fetch('/api/queue/history?path=' + encodeURIComponent(projectPath));
|
|
99
|
-
if (!response.ok) throw new Error('Failed to load queue history');
|
|
100
|
-
const data = await response.json();
|
|
101
|
-
queueData.queues = data.queues || [];
|
|
102
|
-
queueData.activeQueueId = data.active_queue_id;
|
|
103
|
-
} catch (err) {
|
|
104
|
-
console.error('Failed to load all queues:', err);
|
|
105
|
-
queueData.queues = [];
|
|
106
|
-
queueData.activeQueueId = null;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async function loadIssueDetail(issueId) {
|
|
111
|
-
try {
|
|
112
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath));
|
|
113
|
-
if (!response.ok) throw new Error('Failed to load issue detail');
|
|
114
|
-
return await response.json();
|
|
115
|
-
} catch (err) {
|
|
116
|
-
console.error('Failed to load issue detail:', err);
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function updateIssueBadge() {
|
|
122
|
-
const badge = document.getElementById('badgeIssues');
|
|
123
|
-
if (badge) {
|
|
124
|
-
badge.textContent = issueData.issues.length;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// ========== Main View Render ==========
|
|
129
|
-
function renderIssueView() {
|
|
130
|
-
const container = document.getElementById('mainContent');
|
|
131
|
-
if (!container) return;
|
|
132
|
-
|
|
133
|
-
const issues = issueData.issues || [];
|
|
134
|
-
const historyIssues = issueData.historyIssues || [];
|
|
135
|
-
|
|
136
|
-
// Apply both status and search filters
|
|
137
|
-
let filteredIssues;
|
|
138
|
-
if (issueData.statusFilter === 'all') {
|
|
139
|
-
filteredIssues = issues;
|
|
140
|
-
} else if (issueData.statusFilter === 'completed') {
|
|
141
|
-
// For 'completed' filter, include both current completed issues and archived history issues
|
|
142
|
-
const currentCompleted = issues.filter(i => i.status === 'completed');
|
|
143
|
-
// Mark history issues as archived for visual distinction
|
|
144
|
-
const archivedIssues = historyIssues.map(i => ({ ...i, _isArchived: true }));
|
|
145
|
-
filteredIssues = [...currentCompleted, ...archivedIssues];
|
|
146
|
-
} else {
|
|
147
|
-
filteredIssues = issues.filter(i => i.status === issueData.statusFilter);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (issueData.searchQuery) {
|
|
151
|
-
const query = issueData.searchQuery.toLowerCase();
|
|
152
|
-
filteredIssues = filteredIssues.filter(i => {
|
|
153
|
-
// Basic field search
|
|
154
|
-
const basicMatch =
|
|
155
|
-
i.id.toLowerCase().includes(query) ||
|
|
156
|
-
(i.title && i.title.toLowerCase().includes(query)) ||
|
|
157
|
-
(i.context && i.context.toLowerCase().includes(query));
|
|
158
|
-
|
|
159
|
-
if (basicMatch) return true;
|
|
160
|
-
|
|
161
|
-
// Search in solutions
|
|
162
|
-
if (i.solutions && i.solutions.length > 0) {
|
|
163
|
-
return i.solutions.some(sol =>
|
|
164
|
-
(sol.description && sol.description.toLowerCase().includes(query)) ||
|
|
165
|
-
(sol.approach && sol.approach.toLowerCase().includes(query))
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
container.innerHTML = `
|
|
173
|
-
<div class="issue-manager">
|
|
174
|
-
<!-- Header -->
|
|
175
|
-
<div class="issue-header mb-6">
|
|
176
|
-
<div class="flex items-center justify-between flex-wrap gap-4">
|
|
177
|
-
<div class="flex items-center gap-3">
|
|
178
|
-
<div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center">
|
|
179
|
-
<i data-lucide="clipboard-list" class="w-5 h-5 text-primary"></i>
|
|
180
|
-
</div>
|
|
181
|
-
<div>
|
|
182
|
-
<h2 class="text-lg font-semibold text-foreground">${t('issues.title') || 'Issue Manager'}</h2>
|
|
183
|
-
<p class="text-sm text-muted-foreground">${t('issues.description') || 'Manage issues, solutions, and execution queue'}</p>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
<div class="flex items-center gap-3">
|
|
188
|
-
<!-- Pull from GitHub Button -->
|
|
189
|
-
<button class="issue-pull-btn" onclick="showPullIssuesModal()" title="Pull issues from GitHub repository">
|
|
190
|
-
<svg class="w-4 h-4 mr-1.5" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
191
|
-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v 3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
192
|
-
</svg>
|
|
193
|
-
<span>Pull from GitHub</span>
|
|
194
|
-
</button>
|
|
195
|
-
|
|
196
|
-
<!-- Create Button -->
|
|
197
|
-
<button class="issue-create-btn" onclick="showCreateIssueModal()">
|
|
198
|
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
|
199
|
-
<span>${t('issues.create') || 'Create'}</span>
|
|
200
|
-
</button>
|
|
201
|
-
|
|
202
|
-
<!-- View Toggle -->
|
|
203
|
-
<div class="issue-view-toggle">
|
|
204
|
-
<button class="${issueData.viewMode === 'issues' ? 'active' : ''}" onclick="switchIssueView('issues')">
|
|
205
|
-
<i data-lucide="list" class="w-4 h-4 mr-1"></i>
|
|
206
|
-
${t('issues.viewIssues') || 'Issues'}
|
|
207
|
-
</button>
|
|
208
|
-
<button class="${issueData.viewMode === 'queue' ? 'active' : ''}" onclick="switchIssueView('queue')">
|
|
209
|
-
<i data-lucide="git-branch" class="w-4 h-4 mr-1"></i>
|
|
210
|
-
${t('issues.viewQueue') || 'Queue'}
|
|
211
|
-
</button>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
|
|
217
|
-
${issueData.viewMode === 'issues' ? renderIssueListSection(filteredIssues) : renderQueueSection()}
|
|
218
|
-
|
|
219
|
-
<!-- Detail Panel -->
|
|
220
|
-
<div id="issueDetailPanel" class="issue-detail-panel hidden"></div>
|
|
221
|
-
|
|
222
|
-
<!-- Solution Detail Modal -->
|
|
223
|
-
<div id="solutionDetailModal" class="solution-modal hidden">
|
|
224
|
-
<div class="solution-modal-backdrop" onclick="closeSolutionDetail()"></div>
|
|
225
|
-
<div class="solution-modal-content">
|
|
226
|
-
<div class="solution-modal-header">
|
|
227
|
-
<div class="solution-modal-title">
|
|
228
|
-
<span id="solutionDetailId" class="font-mono text-sm text-muted-foreground"></span>
|
|
229
|
-
<h3 id="solutionDetailTitle">${t('issues.solutionDetail') || 'Solution Details'}</h3>
|
|
230
|
-
</div>
|
|
231
|
-
<div class="solution-modal-actions">
|
|
232
|
-
<button id="solutionBindBtn" class="btn-secondary" onclick="toggleSolutionBind()">
|
|
233
|
-
<i data-lucide="link" class="w-4 h-4"></i>
|
|
234
|
-
<span>${t('issues.bind') || 'Bind'}</span>
|
|
235
|
-
</button>
|
|
236
|
-
<button class="btn-icon" onclick="closeSolutionDetail()">
|
|
237
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
238
|
-
</button>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
<div class="solution-modal-body" id="solutionDetailBody">
|
|
242
|
-
<!-- Content will be rendered dynamically -->
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
246
|
-
|
|
247
|
-
<!-- Create Issue Modal -->
|
|
248
|
-
<div id="createIssueModal" class="issue-modal hidden">
|
|
249
|
-
<div class="issue-modal-backdrop" onclick="hideCreateIssueModal()"></div>
|
|
250
|
-
<div class="issue-modal-content">
|
|
251
|
-
<div class="issue-modal-header">
|
|
252
|
-
<h3>${t('issues.createTitle') || 'Create New Issue'}</h3>
|
|
253
|
-
<button class="btn-icon" onclick="hideCreateIssueModal()">
|
|
254
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
255
|
-
</button>
|
|
256
|
-
</div>
|
|
257
|
-
<div class="issue-modal-body">
|
|
258
|
-
<div class="form-group">
|
|
259
|
-
<label>${t('issues.issueId') || 'Issue ID'}</label>
|
|
260
|
-
<div class="input-with-action">
|
|
261
|
-
<input type="text" id="newIssueId" placeholder="${t('issues.idAutoGenerated') || 'Auto-generated'}" />
|
|
262
|
-
<button type="button" class="btn-icon" onclick="regenerateIssueId()" title="${t('issues.regenerateId') || 'Regenerate ID'}">
|
|
263
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
264
|
-
</button>
|
|
265
|
-
</div>
|
|
266
|
-
</div>
|
|
267
|
-
<div class="form-group">
|
|
268
|
-
<label>${t('issues.issueTitle') || 'Title'}</label>
|
|
269
|
-
<input type="text" id="newIssueTitle" placeholder="${t('issues.titlePlaceholder') || 'Brief description of the issue'}" />
|
|
270
|
-
</div>
|
|
271
|
-
<div class="form-group">
|
|
272
|
-
<label>${t('issues.issueContext') || 'Context'} (${t('common.optional') || 'optional'})</label>
|
|
273
|
-
<textarea id="newIssueContext" rows="4" placeholder="${t('issues.contextPlaceholder') || 'Detailed description, requirements, etc.'}"></textarea>
|
|
274
|
-
</div>
|
|
275
|
-
<div class="form-group">
|
|
276
|
-
<label>${t('issues.issuePriority') || 'Priority'}</label>
|
|
277
|
-
<select id="newIssuePriority">
|
|
278
|
-
<option value="1">1 - ${t('issues.priorityLowest') || 'Lowest'}</option>
|
|
279
|
-
<option value="2">2 - ${t('issues.priorityLow') || 'Low'}</option>
|
|
280
|
-
<option value="3" selected>3 - ${t('issues.priorityMedium') || 'Medium'}</option>
|
|
281
|
-
<option value="4">4 - ${t('issues.priorityHigh') || 'High'}</option>
|
|
282
|
-
<option value="5">5 - ${t('issues.priorityCritical') || 'Critical'}</option>
|
|
283
|
-
</select>
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
<div class="issue-modal-footer">
|
|
287
|
-
<button class="btn-secondary" onclick="hideCreateIssueModal()">${t('common.cancel') || 'Cancel'}</button>
|
|
288
|
-
<button class="btn-primary" onclick="createIssue()">${t('issues.create') || 'Create'}</button>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
|
|
293
|
-
<!-- Pull Issues Modal -->
|
|
294
|
-
<div id="pullIssuesModal" class="issue-modal hidden">
|
|
295
|
-
<div class="issue-modal-backdrop" onclick="hidePullIssuesModal()"></div>
|
|
296
|
-
<div class="issue-modal-content">
|
|
297
|
-
<div class="issue-modal-header">
|
|
298
|
-
<h3>
|
|
299
|
-
<svg class="w-5 h-5 inline mr-2 -mt-1" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
300
|
-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
301
|
-
</svg>
|
|
302
|
-
Pull Issues from GitHub
|
|
303
|
-
</h3>
|
|
304
|
-
<button class="btn-icon" onclick="hidePullIssuesModal()">
|
|
305
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
306
|
-
</button>
|
|
307
|
-
</div>
|
|
308
|
-
<div class="issue-modal-body">
|
|
309
|
-
<div class="form-group">
|
|
310
|
-
<label>Issue State</label>
|
|
311
|
-
<select id="pullIssueState">
|
|
312
|
-
<option value="open" selected>Open</option>
|
|
313
|
-
<option value="closed">Closed</option>
|
|
314
|
-
<option value="all">All</option>
|
|
315
|
-
</select>
|
|
316
|
-
</div>
|
|
317
|
-
<div class="form-group">
|
|
318
|
-
<label>Maximum Issues</label>
|
|
319
|
-
<input type="number" id="pullIssueLimit" value="20" min="1" max="100" />
|
|
320
|
-
</div>
|
|
321
|
-
<div class="form-group">
|
|
322
|
-
<label>Labels (optional)</label>
|
|
323
|
-
<input type="text" id="pullIssueLabels" placeholder="bug, enhancement (comma-separated)" />
|
|
324
|
-
</div>
|
|
325
|
-
<div class="form-group">
|
|
326
|
-
<label class="checkbox-label">
|
|
327
|
-
<input type="checkbox" id="pullDownloadImages" checked />
|
|
328
|
-
<span>Download images to local</span>
|
|
329
|
-
</label>
|
|
330
|
-
<p class="form-hint text-xs text-muted-foreground mt-1">Images will be saved to .workflow/issues/images/ and links updated in issue context</p>
|
|
331
|
-
</div>
|
|
332
|
-
<div id="pullIssueResult" class="pull-result hidden mt-4 p-3 rounded-md bg-muted"></div>
|
|
333
|
-
</div>
|
|
334
|
-
<div class="issue-modal-footer">
|
|
335
|
-
<button class="btn-secondary" onclick="hidePullIssuesModal()">Cancel</button>
|
|
336
|
-
<button class="btn-primary" id="pullIssuesBtn" onclick="pullGitHubIssues()">
|
|
337
|
-
<svg class="w-4 h-4 mr-1 inline" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
338
|
-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
339
|
-
</svg>
|
|
340
|
-
Pull Issues
|
|
341
|
-
</button>
|
|
342
|
-
</div>
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
`;
|
|
347
|
-
|
|
348
|
-
lucide.createIcons();
|
|
349
|
-
|
|
350
|
-
// Initialize drag-drop if in queue view
|
|
351
|
-
if (issueData.viewMode === 'queue') {
|
|
352
|
-
initQueueDragDrop();
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
function switchIssueView(mode) {
|
|
357
|
-
issueData.viewMode = mode;
|
|
358
|
-
renderIssueView();
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// ========== Issue List Section ==========
|
|
362
|
-
function renderIssueListSection(issues) {
|
|
363
|
-
const statuses = ['all', 'registered', 'planning', 'planned', 'queued', 'executing', 'completed', 'failed'];
|
|
364
|
-
const totalIssues = issueData.issues?.length || 0;
|
|
365
|
-
|
|
366
|
-
return `
|
|
367
|
-
<!-- Toolbar: Search + Filters -->
|
|
368
|
-
<div class="issue-toolbar mb-4">
|
|
369
|
-
<div class="issue-search">
|
|
370
|
-
<i data-lucide="search" class="w-4 h-4"></i>
|
|
371
|
-
<input type="text"
|
|
372
|
-
id="issueSearchInput"
|
|
373
|
-
placeholder="${t('issues.searchPlaceholder') || 'Search issues...'}"
|
|
374
|
-
value="${issueData.searchQuery}"
|
|
375
|
-
oninput="handleIssueSearch(this.value)"
|
|
376
|
-
onkeydown="handleSearchKeydown(event)"
|
|
377
|
-
onfocus="showSearchSuggestions()"
|
|
378
|
-
autocomplete="off" />
|
|
379
|
-
${issueData.searchQuery ? `
|
|
380
|
-
<button class="issue-search-clear" onclick="clearIssueSearch()">
|
|
381
|
-
<i data-lucide="x" class="w-3 h-3"></i>
|
|
382
|
-
</button>
|
|
383
|
-
` : ''}
|
|
384
|
-
<div class="search-suggestions ${issueData.showSuggestions && issueData.searchSuggestions.length > 0 ? 'show' : ''}" id="searchSuggestions">
|
|
385
|
-
${renderSearchSuggestions()}
|
|
386
|
-
</div>
|
|
387
|
-
</div>
|
|
388
|
-
|
|
389
|
-
<div class="issue-filters">
|
|
390
|
-
<span class="text-sm text-muted-foreground">${t('issues.filterStatus') || 'Status'}:</span>
|
|
391
|
-
${statuses.map(status => `
|
|
392
|
-
<button class="issue-filter-btn ${issueData.statusFilter === status ? 'active' : ''}"
|
|
393
|
-
onclick="filterIssuesByStatus('${status}')">
|
|
394
|
-
${status === 'all' ? (t('issues.filterAll') || 'All') : status}
|
|
395
|
-
</button>
|
|
396
|
-
`).join('')}
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
|
|
400
|
-
<!-- Issues Stats -->
|
|
401
|
-
<div class="issue-stats mb-4">
|
|
402
|
-
<span class="text-sm text-muted-foreground">
|
|
403
|
-
${t('issues.showing') || 'Showing'} <strong>${issues.length}</strong> ${t('issues.of') || 'of'} <strong>${totalIssues}</strong> ${t('issues.issues') || 'issues'}
|
|
404
|
-
</span>
|
|
405
|
-
</div>
|
|
406
|
-
|
|
407
|
-
<!-- Issues Grid -->
|
|
408
|
-
<div class="issues-grid">
|
|
409
|
-
${issues.length === 0 ? `
|
|
410
|
-
<div class="issue-empty-container">
|
|
411
|
-
<div class="issue-empty">
|
|
412
|
-
<i data-lucide="inbox" class="w-16 h-16"></i>
|
|
413
|
-
<p class="issue-empty-title">${t('issues.noIssues') || 'No issues found'}</p>
|
|
414
|
-
<p class="issue-empty-hint">${issueData.searchQuery || issueData.statusFilter !== 'all'
|
|
415
|
-
? (t('issues.tryDifferentFilter') || 'Try adjusting your search or filters')
|
|
416
|
-
: (t('issues.createHint') || 'Click "Create" to add your first issue')}</p>
|
|
417
|
-
${!issueData.searchQuery && issueData.statusFilter === 'all' ? `
|
|
418
|
-
<button class="issue-empty-btn" onclick="showCreateIssueModal()">
|
|
419
|
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
|
420
|
-
${t('issues.createFirst') || 'Create First Issue'}
|
|
421
|
-
</button>
|
|
422
|
-
` : ''}
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
` : issues.map(issue => renderIssueCard(issue)).join('')}
|
|
426
|
-
</div>
|
|
427
|
-
`;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
function renderIssueCard(issue) {
|
|
431
|
-
const statusColors = {
|
|
432
|
-
registered: 'registered',
|
|
433
|
-
planning: 'planning',
|
|
434
|
-
planned: 'planned',
|
|
435
|
-
queued: 'queued',
|
|
436
|
-
executing: 'executing',
|
|
437
|
-
completed: 'completed',
|
|
438
|
-
failed: 'failed'
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
const isArchived = issue._isArchived;
|
|
442
|
-
const archivedDate = issue.archived_at ? new Date(issue.archived_at).toLocaleDateString() : null;
|
|
443
|
-
|
|
444
|
-
return `
|
|
445
|
-
<div class="issue-card ${isArchived ? 'archived' : ''}" onclick="openIssueDetail('${issue.id}'${isArchived ? ', true' : ''})">
|
|
446
|
-
<div class="flex items-start justify-between mb-3">
|
|
447
|
-
<div class="flex items-center gap-2">
|
|
448
|
-
<span class="issue-id font-mono text-sm">${highlightMatch(issue.id, issueData.searchQuery)}</span>
|
|
449
|
-
<span class="issue-status ${statusColors[issue.status] || ''}">${issue.status || 'unknown'}</span>
|
|
450
|
-
${isArchived ? `
|
|
451
|
-
<span class="issue-archived-badge" title="Archived on ${archivedDate || 'Unknown'}">
|
|
452
|
-
<i data-lucide="archive" class="w-3 h-3"></i>
|
|
453
|
-
<span>${t('issues.archived') || 'Archived'}</span>
|
|
454
|
-
</span>
|
|
455
|
-
` : ''}
|
|
456
|
-
</div>
|
|
457
|
-
<span class="issue-priority" title="${t('issues.priority') || 'Priority'}: ${issue.priority || 3}">
|
|
458
|
-
${renderPriorityStars(issue.priority || 3)}
|
|
459
|
-
</span>
|
|
460
|
-
</div>
|
|
461
|
-
|
|
462
|
-
<h3 class="issue-title text-foreground font-medium mb-2">${highlightMatch(issue.title || issue.id, issueData.searchQuery)}</h3>
|
|
463
|
-
|
|
464
|
-
<div class="issue-meta flex items-center gap-4 text-sm text-muted-foreground">
|
|
465
|
-
<span class="flex items-center gap-1">
|
|
466
|
-
<i data-lucide="file-text" class="w-3.5 h-3.5"></i>
|
|
467
|
-
${issue.task_count || 0} ${t('issues.tasks') || 'tasks'}
|
|
468
|
-
</span>
|
|
469
|
-
<span class="flex items-center gap-1">
|
|
470
|
-
<i data-lucide="lightbulb" class="w-3.5 h-3.5"></i>
|
|
471
|
-
${issue.solution_count || 0} ${t('issues.solutions') || 'solutions'}
|
|
472
|
-
</span>
|
|
473
|
-
${issue.bound_solution_id ? `
|
|
474
|
-
<span class="flex items-center gap-1 text-primary">
|
|
475
|
-
<i data-lucide="link" class="w-3.5 h-3.5"></i>
|
|
476
|
-
${t('issues.boundSolution') || 'Bound'}
|
|
477
|
-
</span>
|
|
478
|
-
` : ''}
|
|
479
|
-
${issue.github_url ? `
|
|
480
|
-
<a href="${issue.github_url}" target="_blank" rel="noopener noreferrer"
|
|
481
|
-
class="flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors"
|
|
482
|
-
onclick="event.stopPropagation()" title="View on GitHub">
|
|
483
|
-
<i data-lucide="github" class="w-3.5 h-3.5"></i>
|
|
484
|
-
${issue.github_number ? `#${issue.github_number}` : 'GitHub'}
|
|
485
|
-
</a>
|
|
486
|
-
` : ''}
|
|
487
|
-
</div>
|
|
488
|
-
|
|
489
|
-
${isArchived && archivedDate ? `
|
|
490
|
-
<div class="issue-archived-footer">
|
|
491
|
-
<i data-lucide="clock" class="w-3 h-3"></i>
|
|
492
|
-
<span>Archived on ${archivedDate}</span>
|
|
493
|
-
</div>
|
|
494
|
-
` : ''}
|
|
495
|
-
</div>
|
|
496
|
-
`;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
// Render failure information for failed issues
|
|
500
|
-
function renderFailureInfo(issue) {
|
|
501
|
-
// Check if issue has failure feedback
|
|
502
|
-
if (!issue.feedback || issue.feedback.length === 0) {
|
|
503
|
-
return '';
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// Extract failure feedbacks
|
|
507
|
-
const failures = issue.feedback.filter(f => f.type === 'failure' && f.stage === 'execute');
|
|
508
|
-
if (failures.length === 0) {
|
|
509
|
-
return '';
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
// Get latest failure
|
|
513
|
-
const latestFailure = failures[failures.length - 1];
|
|
514
|
-
let failureDetail;
|
|
515
|
-
try {
|
|
516
|
-
failureDetail = JSON.parse(latestFailure.content);
|
|
517
|
-
} catch {
|
|
518
|
-
return '';
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
const errorMessage = failureDetail.message || 'Unknown error';
|
|
522
|
-
const errorType = failureDetail.error_type || 'error';
|
|
523
|
-
const taskId = failureDetail.task_id;
|
|
524
|
-
const failureCount = failures.length;
|
|
525
|
-
|
|
526
|
-
return `
|
|
527
|
-
<div class="issue-failure-info">
|
|
528
|
-
<div class="failure-header">
|
|
529
|
-
<i data-lucide="alert-circle" class="w-3.5 h-3.5"></i>
|
|
530
|
-
<span class="failure-label">${failureCount > 1 ? `Failed ${failureCount} times` : 'Execution Failed'}</span>
|
|
531
|
-
${taskId ? `<span class="failure-task">${taskId}</span>` : ''}
|
|
532
|
-
</div>
|
|
533
|
-
<div class="failure-message">
|
|
534
|
-
<span class="failure-type">${errorType}:</span>
|
|
535
|
-
<span class="failure-text" title="${escapeHtml(errorMessage)}">${escapeHtml(truncateText(errorMessage, 80))}</span>
|
|
536
|
-
</div>
|
|
537
|
-
</div>
|
|
538
|
-
`;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
function renderFailureHistoryDetail(issue) {
|
|
542
|
-
// Check if issue has failure feedback
|
|
543
|
-
if (!issue.feedback || issue.feedback.length === 0) {
|
|
544
|
-
return '';
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
// Extract failure feedbacks
|
|
548
|
-
const failures = issue.feedback.filter(f => f.type === 'failure' && f.stage === 'execute');
|
|
549
|
-
if (failures.length === 0) {
|
|
550
|
-
return '';
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
return `
|
|
554
|
-
<div class="detail-section">
|
|
555
|
-
<label class="detail-label">${t('issues.failureHistory') || 'Failure History'} (${failures.length})</label>
|
|
556
|
-
<div class="failure-history-list">
|
|
557
|
-
${failures.map((failure, index) => {
|
|
558
|
-
let failureDetail;
|
|
559
|
-
try {
|
|
560
|
-
failureDetail = JSON.parse(failure.content);
|
|
561
|
-
} catch {
|
|
562
|
-
return '';
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
const errorMessage = failureDetail.message || 'Unknown error';
|
|
566
|
-
const errorType = failureDetail.error_type || 'error';
|
|
567
|
-
const taskId = failureDetail.task_id;
|
|
568
|
-
const timestamp = failure.created_at ? new Date(failure.created_at).toLocaleString() : 'Unknown time';
|
|
569
|
-
|
|
570
|
-
return `
|
|
571
|
-
<div class="failure-history-item">
|
|
572
|
-
<div class="failure-history-header">
|
|
573
|
-
<i data-lucide="alert-circle" class="w-4 h-4"></i>
|
|
574
|
-
<span class="failure-history-count">Failure ${index + 1}</span>
|
|
575
|
-
<span class="failure-history-timestamp text-xs text-muted-foreground">${timestamp}</span>
|
|
576
|
-
</div>
|
|
577
|
-
<div class="failure-history-content">
|
|
578
|
-
${taskId ? `
|
|
579
|
-
<div class="failure-history-task">
|
|
580
|
-
<span class="detail-label-sm">Task:</span>
|
|
581
|
-
<span class="font-mono text-xs">${taskId}</span>
|
|
582
|
-
</div>
|
|
583
|
-
` : ''}
|
|
584
|
-
<div class="failure-history-error">
|
|
585
|
-
<span class="detail-label-sm">Error Type:</span>
|
|
586
|
-
<span class="font-mono text-xs">${errorType}</span>
|
|
587
|
-
</div>
|
|
588
|
-
<div class="failure-history-message">
|
|
589
|
-
<span class="detail-label-sm">Message:</span>
|
|
590
|
-
<pre class="detail-pre text-xs">${escapeHtml(errorMessage)}</pre>
|
|
591
|
-
</div>
|
|
592
|
-
${failureDetail.stack_trace ? `
|
|
593
|
-
<details class="failure-history-stacktrace">
|
|
594
|
-
<summary class="cursor-pointer text-xs text-muted-foreground">Show Stack Trace</summary>
|
|
595
|
-
<pre class="detail-pre text-xs mt-1 max-h-60 overflow-auto">${escapeHtml(failureDetail.stack_trace)}</pre>
|
|
596
|
-
</details>
|
|
597
|
-
` : ''}
|
|
598
|
-
</div>
|
|
599
|
-
</div>
|
|
600
|
-
`;
|
|
601
|
-
}).join('')}
|
|
602
|
-
</div>
|
|
603
|
-
</div>
|
|
604
|
-
`;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
// Helper: Truncate text to max length
|
|
608
|
-
function truncateText(text, maxLength) {
|
|
609
|
-
if (!text || text.length <= maxLength) return text;
|
|
610
|
-
return text.substring(0, maxLength - 3) + '...';
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
function renderPriorityStars(priority) {
|
|
614
|
-
const maxStars = 5;
|
|
615
|
-
let stars = '';
|
|
616
|
-
for (let i = 1; i <= maxStars; i++) {
|
|
617
|
-
stars += `<i data-lucide="star" class="w-3 h-3 ${i <= priority ? 'text-warning fill-warning' : 'text-muted'}"></i>`;
|
|
618
|
-
}
|
|
619
|
-
return stars;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
async function filterIssuesByStatus(status) {
|
|
623
|
-
issueData.statusFilter = status;
|
|
624
|
-
// Load history data when filtering by 'completed' status
|
|
625
|
-
if (status === 'completed' && issueData.historyIssues.length === 0) {
|
|
626
|
-
await loadIssueHistory();
|
|
627
|
-
}
|
|
628
|
-
renderIssueView();
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
// ========== Queue Section ==========
|
|
632
|
-
function renderQueueSection() {
|
|
633
|
-
const queues = queueData.queues || [];
|
|
634
|
-
const activeQueueId = queueData.activeQueueId;
|
|
635
|
-
const expandedQueueId = queueData.expandedQueueId;
|
|
636
|
-
|
|
637
|
-
// If a queue is expanded, show loading then load detail
|
|
638
|
-
if (expandedQueueId) {
|
|
639
|
-
// Show loading state first, then load async
|
|
640
|
-
setTimeout(() => loadAndRenderExpandedQueue(expandedQueueId), 0);
|
|
641
|
-
return `
|
|
642
|
-
<div id="queueExpandedWrapper" class="queue-expanded-wrapper">
|
|
643
|
-
<div class="queue-detail-header mb-4">
|
|
644
|
-
<button class="btn-secondary" onclick="queueData.expandedQueueId = null; renderIssueView();">
|
|
645
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i>
|
|
646
|
-
<span>${t('common.back') || 'Back'}</span>
|
|
647
|
-
</button>
|
|
648
|
-
<div class="queue-detail-title">
|
|
649
|
-
<h3 class="font-mono text-lg">${escapeHtml(expandedQueueId)}</h3>
|
|
650
|
-
</div>
|
|
651
|
-
</div>
|
|
652
|
-
<div id="expandedQueueContent" class="flex items-center justify-center py-8">
|
|
653
|
-
<i data-lucide="loader-2" class="w-6 h-6 animate-spin"></i>
|
|
654
|
-
<span class="ml-2">${t('common.loading') || 'Loading...'}</span>
|
|
655
|
-
</div>
|
|
656
|
-
</div>
|
|
657
|
-
`;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
// Show multi-queue cards view
|
|
661
|
-
return `
|
|
662
|
-
<!-- Queue Cards Header -->
|
|
663
|
-
<div class="queue-cards-header mb-4">
|
|
664
|
-
<div class="flex items-center gap-3">
|
|
665
|
-
<h3 class="text-lg font-semibold">${t('issues.executionQueues') || 'Execution Queues'}</h3>
|
|
666
|
-
<span class="text-sm text-muted-foreground">${queues.length} ${t('issues.queues') || 'queues'}</span>
|
|
667
|
-
</div>
|
|
668
|
-
<div class="flex items-center gap-2">
|
|
669
|
-
<button class="btn-secondary" onclick="loadAllQueues().then(() => renderIssueView())" title="${t('issues.refresh') || 'Refresh'}">
|
|
670
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
671
|
-
</button>
|
|
672
|
-
<button class="btn-primary" onclick="createExecutionQueue()">
|
|
673
|
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
|
674
|
-
<span>${t('issues.createQueue') || 'Create Queue'}</span>
|
|
675
|
-
</button>
|
|
676
|
-
</div>
|
|
677
|
-
</div>
|
|
678
|
-
|
|
679
|
-
${queues.length === 0 ? `
|
|
680
|
-
<div class="queue-empty-container">
|
|
681
|
-
<div class="queue-empty">
|
|
682
|
-
<i data-lucide="git-branch" class="w-16 h-16"></i>
|
|
683
|
-
<p class="queue-empty-title">${t('issues.noQueues') || 'No queues found'}</p>
|
|
684
|
-
<p class="queue-empty-hint">${t('issues.queueEmptyHint') || 'Generate execution queue from bound solutions'}</p>
|
|
685
|
-
<button class="queue-create-btn" onclick="createExecutionQueue()">
|
|
686
|
-
<i data-lucide="play" class="w-4 h-4"></i>
|
|
687
|
-
<span>${t('issues.createQueue') || 'Create Queue'}</span>
|
|
688
|
-
</button>
|
|
689
|
-
</div>
|
|
690
|
-
</div>
|
|
691
|
-
` : `
|
|
692
|
-
<!-- Queue Cards Grid -->
|
|
693
|
-
<div class="queue-cards-grid">
|
|
694
|
-
${queues.map(q => renderQueueCard(q, q.id === activeQueueId)).join('')}
|
|
695
|
-
</div>
|
|
696
|
-
`}
|
|
697
|
-
`;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
function renderQueueCard(queue, isActive) {
|
|
701
|
-
const itemCount = queue.total_solutions || queue.total_tasks || 0;
|
|
702
|
-
const completedCount = queue.completed_solutions || queue.completed_tasks || 0;
|
|
703
|
-
const progressPercent = itemCount > 0 ? Math.round((completedCount / itemCount) * 100) : 0;
|
|
704
|
-
const issueCount = queue.issue_ids?.length || 0;
|
|
705
|
-
const statusClass = queue.status || '';
|
|
706
|
-
const safeQueueId = escapeHtml(queue.id || '');
|
|
707
|
-
|
|
708
|
-
return `
|
|
709
|
-
<div class="queue-card ${isActive ? 'active' : ''} ${statusClass}" onclick="toggleQueueExpand('${safeQueueId}')">
|
|
710
|
-
<div class="queue-card-header">
|
|
711
|
-
<span class="queue-card-id font-mono">${safeQueueId}</span>
|
|
712
|
-
<div class="queue-card-badges">
|
|
713
|
-
${isActive ? '<span class="queue-active-badge">Active</span>' : ''}
|
|
714
|
-
${!isActive || queue.status !== 'active' ? `<span class="queue-status-badge ${statusClass}">${queue.status || 'unknown'}</span>` : ''}
|
|
715
|
-
</div>
|
|
716
|
-
</div>
|
|
717
|
-
|
|
718
|
-
<div class="queue-card-stats">
|
|
719
|
-
<div class="progress-bar">
|
|
720
|
-
<div class="progress-fill ${queue.status === 'completed' ? 'completed' : ''}" style="width: ${progressPercent}%"></div>
|
|
721
|
-
</div>
|
|
722
|
-
<div class="queue-card-progress">
|
|
723
|
-
<span>${completedCount}/${itemCount} ${queue.total_solutions ? 'solutions' : 'tasks'}</span>
|
|
724
|
-
<span class="text-muted-foreground">${progressPercent}%</span>
|
|
725
|
-
</div>
|
|
726
|
-
</div>
|
|
727
|
-
|
|
728
|
-
<div class="queue-card-meta">
|
|
729
|
-
<span class="flex items-center gap-1">
|
|
730
|
-
<i data-lucide="layers" class="w-3 h-3"></i>
|
|
731
|
-
${issueCount} issues
|
|
732
|
-
</span>
|
|
733
|
-
<span class="flex items-center gap-1">
|
|
734
|
-
<i data-lucide="calendar" class="w-3 h-3"></i>
|
|
735
|
-
${queue.created_at ? new Date(queue.created_at).toLocaleDateString() : 'N/A'}
|
|
736
|
-
</span>
|
|
737
|
-
</div>
|
|
738
|
-
|
|
739
|
-
<div class="queue-card-actions" onclick="event.stopPropagation()">
|
|
740
|
-
<button class="btn-sm" onclick="toggleQueueExpand('${safeQueueId}')" title="View details">
|
|
741
|
-
<i data-lucide="eye" class="w-3 h-3"></i>
|
|
742
|
-
</button>
|
|
743
|
-
${!isActive && queue.status !== 'archived' ? `
|
|
744
|
-
<button class="btn-sm btn-primary" onclick="activateQueue('${safeQueueId}')" title="Set as active">
|
|
745
|
-
<i data-lucide="check-circle" class="w-3 h-3"></i>
|
|
746
|
-
</button>
|
|
747
|
-
` : ''}
|
|
748
|
-
${queue.status !== 'archived' ? `
|
|
749
|
-
<button class="btn-sm" onclick="showMergeQueueModal('${safeQueueId}')" title="Merge into another queue">
|
|
750
|
-
<i data-lucide="git-merge" class="w-3 h-3"></i>
|
|
751
|
-
</button>
|
|
752
|
-
` : ''}
|
|
753
|
-
${queue.status !== 'archived' && issueCount > 1 ? `
|
|
754
|
-
<button class="btn-sm" onclick="showSplitQueueModal('${safeQueueId}')" title="Split queue into multiple queues">
|
|
755
|
-
<i data-lucide="git-branch" class="w-3 h-3"></i>
|
|
756
|
-
</button>
|
|
757
|
-
` : ''}
|
|
758
|
-
<button class="btn-sm btn-danger" onclick="confirmDeleteQueue('${safeQueueId}')" title="${t('issues.deleteQueue') || 'Delete queue'}">
|
|
759
|
-
<i data-lucide="trash-2" class="w-3 h-3"></i>
|
|
760
|
-
</button>
|
|
761
|
-
</div>
|
|
762
|
-
</div>
|
|
763
|
-
`;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
function toggleQueueExpand(queueId) {
|
|
767
|
-
if (queueData.expandedQueueId === queueId) {
|
|
768
|
-
queueData.expandedQueueId = null;
|
|
769
|
-
} else {
|
|
770
|
-
queueData.expandedQueueId = queueId;
|
|
771
|
-
}
|
|
772
|
-
renderIssueView();
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
async function activateQueue(queueId) {
|
|
776
|
-
try {
|
|
777
|
-
const response = await fetch('/api/queue/switch?path=' + encodeURIComponent(projectPath), {
|
|
778
|
-
method: 'POST',
|
|
779
|
-
headers: { 'Content-Type': 'application/json' },
|
|
780
|
-
body: JSON.stringify({ queueId })
|
|
781
|
-
});
|
|
782
|
-
const result = await response.json();
|
|
783
|
-
if (result.success) {
|
|
784
|
-
showNotification(t('issues.queueActivated') || 'Queue activated: ' + queueId, 'success');
|
|
785
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
786
|
-
renderIssueView();
|
|
787
|
-
} else {
|
|
788
|
-
showNotification(result.error || 'Failed to activate queue', 'error');
|
|
789
|
-
}
|
|
790
|
-
} catch (err) {
|
|
791
|
-
console.error('Failed to activate queue:', err);
|
|
792
|
-
showNotification('Failed to activate queue', 'error');
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
async function deactivateQueue(queueId) {
|
|
797
|
-
try {
|
|
798
|
-
const response = await fetch('/api/queue/deactivate?path=' + encodeURIComponent(projectPath), {
|
|
799
|
-
method: 'POST',
|
|
800
|
-
headers: { 'Content-Type': 'application/json' },
|
|
801
|
-
body: JSON.stringify({ queueId })
|
|
802
|
-
});
|
|
803
|
-
const result = await response.json();
|
|
804
|
-
if (result.success) {
|
|
805
|
-
showNotification(t('issues.queueDeactivated') || 'Queue deactivated', 'success');
|
|
806
|
-
queueData.activeQueueId = null;
|
|
807
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
808
|
-
renderIssueView();
|
|
809
|
-
} else {
|
|
810
|
-
showNotification(result.error || 'Failed to deactivate queue', 'error');
|
|
811
|
-
}
|
|
812
|
-
} catch (err) {
|
|
813
|
-
console.error('Failed to deactivate queue:', err);
|
|
814
|
-
showNotification('Failed to deactivate queue', 'error');
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
function confirmDeleteQueue(queueId) {
|
|
819
|
-
const msg = t('issues.confirmDeleteQueue') || 'Are you sure you want to delete this queue? This action cannot be undone.';
|
|
820
|
-
if (confirm(msg)) {
|
|
821
|
-
deleteQueue(queueId);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
async function deleteQueue(queueId) {
|
|
826
|
-
try {
|
|
827
|
-
const response = await fetch('/api/queue/' + encodeURIComponent(queueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
828
|
-
method: 'DELETE'
|
|
829
|
-
});
|
|
830
|
-
const result = await response.json();
|
|
831
|
-
if (result.success) {
|
|
832
|
-
showNotification(t('issues.queueDeleted') || 'Queue deleted successfully', 'success');
|
|
833
|
-
queueData.expandedQueueId = null;
|
|
834
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
835
|
-
renderIssueView();
|
|
836
|
-
} else {
|
|
837
|
-
showNotification(result.error || 'Failed to delete queue', 'error');
|
|
838
|
-
}
|
|
839
|
-
} catch (err) {
|
|
840
|
-
console.error('Failed to delete queue:', err);
|
|
841
|
-
showNotification('Failed to delete queue', 'error');
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
async function renderExpandedQueueView(queueId) {
|
|
846
|
-
const safeQueueId = escapeHtml(queueId || '');
|
|
847
|
-
// Fetch queue detail
|
|
848
|
-
let queue;
|
|
849
|
-
try {
|
|
850
|
-
const response = await fetch('/api/queue/' + encodeURIComponent(queueId) + '?path=' + encodeURIComponent(projectPath));
|
|
851
|
-
queue = await response.json();
|
|
852
|
-
if (queue.error) throw new Error(queue.error);
|
|
853
|
-
} catch (err) {
|
|
854
|
-
return `
|
|
855
|
-
<div class="queue-error">
|
|
856
|
-
<button class="btn-secondary mb-4" onclick="queueData.expandedQueueId = null; renderIssueView();">
|
|
857
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i> Back
|
|
858
|
-
</button>
|
|
859
|
-
<p class="text-red-500">Failed to load queue: ${escapeHtml(err.message)}</p>
|
|
860
|
-
</div>
|
|
861
|
-
`;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
const queueItems = queue.solutions || queue.tasks || [];
|
|
865
|
-
const isSolutionLevel = !!(queue.solutions && queue.solutions.length > 0);
|
|
866
|
-
const metadata = queue._metadata || {};
|
|
867
|
-
const isActive = queueId === queueData.activeQueueId;
|
|
868
|
-
|
|
869
|
-
// Group items by execution_group
|
|
870
|
-
const groupMap = {};
|
|
871
|
-
queueItems.forEach(item => {
|
|
872
|
-
const groupId = item.execution_group || 'default';
|
|
873
|
-
if (!groupMap[groupId]) groupMap[groupId] = [];
|
|
874
|
-
groupMap[groupId].push(item);
|
|
875
|
-
});
|
|
876
|
-
|
|
877
|
-
const groups = queue.execution_groups || Object.keys(groupMap).map(groupId => ({
|
|
878
|
-
id: groupId,
|
|
879
|
-
type: groupId.startsWith('P') ? 'parallel' : 'sequential',
|
|
880
|
-
solution_count: groupMap[groupId]?.length || 0
|
|
881
|
-
}));
|
|
882
|
-
const groupedItems = queue.grouped_items || groupMap;
|
|
883
|
-
|
|
884
|
-
return `
|
|
885
|
-
<!-- Back Button & Queue Header -->
|
|
886
|
-
<div class="queue-detail-header mb-4">
|
|
887
|
-
<button class="btn-secondary" onclick="queueData.expandedQueueId = null; renderIssueView();">
|
|
888
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i>
|
|
889
|
-
<span>${t('common.back') || 'Back'}</span>
|
|
890
|
-
</button>
|
|
891
|
-
<div class="queue-detail-title">
|
|
892
|
-
<h3 class="font-mono text-lg">${escapeHtml(queue.id || queueId)}</h3>
|
|
893
|
-
<div class="flex items-center gap-2">
|
|
894
|
-
${isActive ? '<span class="queue-active-badge">Active</span>' : ''}
|
|
895
|
-
<span class="queue-status-badge ${escapeHtml(queue.status || '')}">${escapeHtml(queue.status || 'unknown')}</span>
|
|
896
|
-
</div>
|
|
897
|
-
</div>
|
|
898
|
-
<div class="queue-detail-actions">
|
|
899
|
-
${!isActive && queue.status !== 'archived' ? `
|
|
900
|
-
<button class="btn-primary" onclick="activateQueue('${safeQueueId}')">
|
|
901
|
-
<i data-lucide="check-circle" class="w-4 h-4"></i>
|
|
902
|
-
<span>${t('issues.activate') || 'Activate'}</span>
|
|
903
|
-
</button>
|
|
904
|
-
` : ''}
|
|
905
|
-
${isActive ? `
|
|
906
|
-
<button class="btn-secondary btn-warning" onclick="deactivateQueue('${safeQueueId}')">
|
|
907
|
-
<i data-lucide="x-circle" class="w-4 h-4"></i>
|
|
908
|
-
<span>${t('issues.deactivate') || 'Deactivate'}</span>
|
|
909
|
-
</button>
|
|
910
|
-
` : ''}
|
|
911
|
-
<button class="btn-secondary" onclick="refreshExpandedQueue('${safeQueueId}')">
|
|
912
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
913
|
-
</button>
|
|
914
|
-
</div>
|
|
915
|
-
</div>
|
|
916
|
-
|
|
917
|
-
<!-- Queue Stats -->
|
|
918
|
-
<div class="queue-stats-grid mb-4">
|
|
919
|
-
<div class="queue-stat-card">
|
|
920
|
-
<span class="queue-stat-value">${isSolutionLevel ? (metadata.total_solutions || queueItems.length) : (metadata.total_tasks || queueItems.length)}</span>
|
|
921
|
-
<span class="queue-stat-label">${isSolutionLevel ? 'Solutions' : 'Tasks'}</span>
|
|
922
|
-
</div>
|
|
923
|
-
<div class="queue-stat-card pending">
|
|
924
|
-
<span class="queue-stat-value">${metadata.pending_count || queueItems.filter(i => i.status === 'pending').length}</span>
|
|
925
|
-
<span class="queue-stat-label">Pending</span>
|
|
926
|
-
</div>
|
|
927
|
-
<div class="queue-stat-card executing">
|
|
928
|
-
<span class="queue-stat-value">${metadata.executing_count || queueItems.filter(i => i.status === 'executing').length}</span>
|
|
929
|
-
<span class="queue-stat-label">Executing</span>
|
|
930
|
-
</div>
|
|
931
|
-
<div class="queue-stat-card completed">
|
|
932
|
-
<span class="queue-stat-value">${isSolutionLevel ? (metadata.completed_solutions || 0) : (metadata.completed_tasks || queueItems.filter(i => i.status === 'completed').length)}</span>
|
|
933
|
-
<span class="queue-stat-label">Completed</span>
|
|
934
|
-
</div>
|
|
935
|
-
<div class="queue-stat-card failed">
|
|
936
|
-
<span class="queue-stat-value">${metadata.failed_count || queueItems.filter(i => i.status === 'failed').length}</span>
|
|
937
|
-
<span class="queue-stat-label">Failed</span>
|
|
938
|
-
</div>
|
|
939
|
-
</div>
|
|
940
|
-
|
|
941
|
-
<div class="queue-info mb-4">
|
|
942
|
-
<p class="text-sm text-muted-foreground">
|
|
943
|
-
<i data-lucide="info" class="w-4 h-4 inline mr-1"></i>
|
|
944
|
-
${t('issues.reorderHint') || 'Drag items within a group to reorder. Click item to view details.'}
|
|
945
|
-
</p>
|
|
946
|
-
</div>
|
|
947
|
-
|
|
948
|
-
<div class="queue-timeline">
|
|
949
|
-
${groups.map(group => renderQueueGroupWithDelete(group, groupedItems[group.id] || groupMap[group.id] || [], queueId)).join('')}
|
|
950
|
-
</div>
|
|
951
|
-
|
|
952
|
-
${queue.conflicts && queue.conflicts.length > 0 ? renderConflictsSection(queue.conflicts) : ''}
|
|
953
|
-
`;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
// Async loader for expanded queue view - renders into DOM container
|
|
957
|
-
async function loadAndRenderExpandedQueue(queueId) {
|
|
958
|
-
const wrapper = document.getElementById('queueExpandedWrapper');
|
|
959
|
-
if (!wrapper) return;
|
|
960
|
-
|
|
961
|
-
try {
|
|
962
|
-
const html = await renderExpandedQueueView(queueId);
|
|
963
|
-
wrapper.innerHTML = html;
|
|
964
|
-
// Re-init icons and drag-drop after DOM update
|
|
965
|
-
if (window.lucide) {
|
|
966
|
-
window.lucide.createIcons();
|
|
967
|
-
}
|
|
968
|
-
// Initialize drag-drop for queue items
|
|
969
|
-
initQueueDragDrop();
|
|
970
|
-
} catch (err) {
|
|
971
|
-
console.error('Failed to load expanded queue:', err);
|
|
972
|
-
wrapper.innerHTML = `
|
|
973
|
-
<div class="text-center py-8 text-red-500">
|
|
974
|
-
<i data-lucide="alert-circle" class="w-8 h-8 mx-auto mb-2"></i>
|
|
975
|
-
<p>Failed to load queue: ${escapeHtml(err.message || 'Unknown error')}</p>
|
|
976
|
-
<button class="btn-secondary mt-4" onclick="queueData.expandedQueueId = null; renderIssueView();">
|
|
977
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i> Back
|
|
978
|
-
</button>
|
|
979
|
-
</div>
|
|
980
|
-
`;
|
|
981
|
-
if (window.lucide) {
|
|
982
|
-
window.lucide.createIcons();
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
function renderQueueGroupWithDelete(group, items, queueId) {
|
|
988
|
-
const isParallel = group.type === 'parallel';
|
|
989
|
-
const itemCount = group.solution_count || group.task_count || items.length;
|
|
990
|
-
const itemLabel = group.solution_count ? 'solutions' : 'tasks';
|
|
991
|
-
|
|
992
|
-
return `
|
|
993
|
-
<div class="queue-group" data-group-id="${group.id}">
|
|
994
|
-
<div class="queue-group-header">
|
|
995
|
-
<div class="queue-group-type ${isParallel ? 'parallel' : 'sequential'}">
|
|
996
|
-
<i data-lucide="${isParallel ? 'git-merge' : 'arrow-right'}" class="w-4 h-4"></i>
|
|
997
|
-
${group.id} (${isParallel ? 'Parallel' : 'Sequential'})
|
|
998
|
-
</div>
|
|
999
|
-
<span class="text-sm text-muted-foreground">${itemCount} ${itemLabel}</span>
|
|
1000
|
-
</div>
|
|
1001
|
-
<div class="queue-items ${isParallel ? 'parallel' : 'sequential'}">
|
|
1002
|
-
${items.map((item, idx) => renderQueueItemWithDelete(item, idx, items.length, queueId)).join('')}
|
|
1003
|
-
</div>
|
|
1004
|
-
</div>
|
|
1005
|
-
`;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
function renderQueueItemWithDelete(item, index, total, queueId) {
|
|
1009
|
-
const statusColors = {
|
|
1010
|
-
pending: '',
|
|
1011
|
-
ready: 'ready',
|
|
1012
|
-
executing: 'executing',
|
|
1013
|
-
completed: 'completed',
|
|
1014
|
-
failed: 'failed',
|
|
1015
|
-
blocked: 'blocked'
|
|
1016
|
-
};
|
|
1017
|
-
|
|
1018
|
-
const isSolutionItem = item.task_count !== undefined;
|
|
1019
|
-
const safeItemId = escapeHtml(item.item_id || '');
|
|
1020
|
-
const safeIssueId = escapeHtml(item.issue_id || '');
|
|
1021
|
-
const safeQueueId = escapeHtml(queueId || '');
|
|
1022
|
-
const safeSolutionId = escapeHtml(item.solution_id || '');
|
|
1023
|
-
const safeTaskId = escapeHtml(item.task_id || '-');
|
|
1024
|
-
const safeFilesTouched = item.files_touched ? escapeHtml(item.files_touched.join(', ')) : '';
|
|
1025
|
-
const safeDependsOn = item.depends_on ? escapeHtml(item.depends_on.join(', ')) : '';
|
|
1026
|
-
|
|
1027
|
-
return `
|
|
1028
|
-
<div class="queue-item ${statusColors[item.status] || ''}"
|
|
1029
|
-
draggable="true"
|
|
1030
|
-
data-item-id="${safeItemId}"
|
|
1031
|
-
data-group-id="${escapeHtml(item.execution_group || '')}"
|
|
1032
|
-
onclick="openQueueItemDetail('${safeItemId}')">
|
|
1033
|
-
<span class="queue-item-id font-mono text-xs">${safeItemId}</span>
|
|
1034
|
-
<span class="queue-item-issue text-xs text-muted-foreground">${safeIssueId}</span>
|
|
1035
|
-
${isSolutionItem ? `
|
|
1036
|
-
<span class="queue-item-solution text-sm" title="${safeSolutionId}">
|
|
1037
|
-
<i data-lucide="package" class="w-3 h-3 inline mr-1"></i>
|
|
1038
|
-
${item.task_count} tasks
|
|
1039
|
-
</span>
|
|
1040
|
-
${item.files_touched && item.files_touched.length > 0 ? `
|
|
1041
|
-
<span class="queue-item-files text-xs text-muted-foreground" title="${safeFilesTouched}">
|
|
1042
|
-
<i data-lucide="file" class="w-3 h-3"></i>
|
|
1043
|
-
${item.files_touched.length}
|
|
1044
|
-
</span>
|
|
1045
|
-
` : ''}
|
|
1046
|
-
` : `
|
|
1047
|
-
<span class="queue-item-task text-sm">${safeTaskId}</span>
|
|
1048
|
-
`}
|
|
1049
|
-
<span class="queue-item-priority" style="opacity: ${item.semantic_priority || 0.5}">
|
|
1050
|
-
<i data-lucide="arrow-up" class="w-3 h-3"></i>
|
|
1051
|
-
</span>
|
|
1052
|
-
${item.depends_on && item.depends_on.length > 0 ? `
|
|
1053
|
-
<span class="queue-item-deps text-xs text-muted-foreground" title="Depends on: ${safeDependsOn}">
|
|
1054
|
-
<i data-lucide="link" class="w-3 h-3"></i>
|
|
1055
|
-
</span>
|
|
1056
|
-
` : ''}
|
|
1057
|
-
${renderQueueItemFailureInfo(item)}
|
|
1058
|
-
<button class="queue-item-delete btn-icon" onclick="event.stopPropagation(); deleteQueueItem('${safeQueueId}', '${safeItemId}')" title="Delete item">
|
|
1059
|
-
<i data-lucide="trash-2" class="w-3 h-3"></i>
|
|
1060
|
-
</button>
|
|
1061
|
-
</div>
|
|
1062
|
-
`;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
// Render failure info for queue items
|
|
1066
|
-
function renderQueueItemFailureInfo(item) {
|
|
1067
|
-
// Only show for failed items
|
|
1068
|
-
if (item.status !== 'failed') {
|
|
1069
|
-
return '';
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
// Check failure_details or failure_reason
|
|
1073
|
-
const failureDetails = item.failure_details;
|
|
1074
|
-
const failureReason = item.failure_reason;
|
|
1075
|
-
|
|
1076
|
-
if (!failureDetails && !failureReason) {
|
|
1077
|
-
return '';
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
let errorType = 'error';
|
|
1081
|
-
let errorMessage = 'Unknown error';
|
|
1082
|
-
|
|
1083
|
-
if (failureDetails) {
|
|
1084
|
-
errorType = failureDetails.error_type || 'error';
|
|
1085
|
-
errorMessage = failureDetails.message || 'Unknown error';
|
|
1086
|
-
} else if (failureReason) {
|
|
1087
|
-
// Try to parse as JSON
|
|
1088
|
-
try {
|
|
1089
|
-
const parsed = JSON.parse(failureReason);
|
|
1090
|
-
errorType = parsed.error_type || 'error';
|
|
1091
|
-
errorMessage = parsed.message || failureReason;
|
|
1092
|
-
} catch {
|
|
1093
|
-
errorMessage = failureReason;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
return `
|
|
1098
|
-
<span class="queue-item-failure text-xs" title="${escapeHtml(errorMessage)}">
|
|
1099
|
-
<i data-lucide="alert-circle" class="w-3 h-3"></i>
|
|
1100
|
-
<span class="failure-type">${escapeHtml(errorType)}:</span>
|
|
1101
|
-
<span class="failure-msg">${escapeHtml(truncateText(errorMessage, 40))}</span>
|
|
1102
|
-
</span>
|
|
1103
|
-
`;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
async function deleteQueueItem(queueId, itemId) {
|
|
1107
|
-
if (!confirm('Delete this item from queue?')) return;
|
|
1108
|
-
|
|
1109
|
-
try {
|
|
1110
|
-
const response = await fetch('/api/queue/' + queueId + '/item/' + encodeURIComponent(itemId) + '?path=' + encodeURIComponent(projectPath), {
|
|
1111
|
-
method: 'DELETE'
|
|
1112
|
-
});
|
|
1113
|
-
const result = await response.json();
|
|
1114
|
-
|
|
1115
|
-
if (result.success) {
|
|
1116
|
-
showNotification('Item deleted from queue', 'success');
|
|
1117
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
1118
|
-
renderIssueView();
|
|
1119
|
-
} else {
|
|
1120
|
-
showNotification(result.error || 'Failed to delete item', 'error');
|
|
1121
|
-
}
|
|
1122
|
-
} catch (err) {
|
|
1123
|
-
console.error('Failed to delete queue item:', err);
|
|
1124
|
-
showNotification('Failed to delete item', 'error');
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
async function refreshExpandedQueue(queueId) {
|
|
1129
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
1130
|
-
renderIssueView();
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
// ========== Queue Merge Modal ==========
|
|
1134
|
-
function showMergeQueueModal(sourceQueueId) {
|
|
1135
|
-
let modal = document.getElementById('mergeQueueModal');
|
|
1136
|
-
if (!modal) {
|
|
1137
|
-
modal = document.createElement('div');
|
|
1138
|
-
modal.id = 'mergeQueueModal';
|
|
1139
|
-
modal.className = 'issue-modal';
|
|
1140
|
-
document.body.appendChild(modal);
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
const otherQueues = queueData.queues.filter(q =>
|
|
1144
|
-
q.id !== sourceQueueId && q.status !== 'archived'
|
|
1145
|
-
);
|
|
1146
|
-
|
|
1147
|
-
const safeSourceId = escapeHtml(sourceQueueId || '');
|
|
1148
|
-
|
|
1149
|
-
modal.innerHTML = `
|
|
1150
|
-
<div class="issue-modal-backdrop" onclick="hideMergeQueueModal()"></div>
|
|
1151
|
-
<div class="issue-modal-content" style="max-width: 500px;">
|
|
1152
|
-
<div class="issue-modal-header">
|
|
1153
|
-
<h3><i data-lucide="git-merge" class="w-5 h-5 inline mr-2"></i>Merge Queue</h3>
|
|
1154
|
-
<button class="btn-icon" onclick="hideMergeQueueModal()">
|
|
1155
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1156
|
-
</button>
|
|
1157
|
-
</div>
|
|
1158
|
-
<div class="issue-modal-body">
|
|
1159
|
-
<p class="mb-4">Merge <strong class="font-mono">${safeSourceId}</strong> into another queue:</p>
|
|
1160
|
-
${otherQueues.length === 0 ? `
|
|
1161
|
-
<p class="text-muted-foreground text-center py-4">No other queues available for merging</p>
|
|
1162
|
-
` : `
|
|
1163
|
-
<div class="form-group">
|
|
1164
|
-
<label>Target Queue</label>
|
|
1165
|
-
<select id="targetQueueSelect" class="w-full">
|
|
1166
|
-
${otherQueues.map(q => `
|
|
1167
|
-
<option value="${escapeHtml(q.id)}">${escapeHtml(q.id)} (${q.total_solutions || q.total_tasks || 0} items)</option>
|
|
1168
|
-
`).join('')}
|
|
1169
|
-
</select>
|
|
1170
|
-
</div>
|
|
1171
|
-
<p class="text-sm text-muted-foreground mt-2">
|
|
1172
|
-
<i data-lucide="info" class="w-4 h-4 inline mr-1"></i>
|
|
1173
|
-
Items from source queue will be appended to target queue. Source queue will be archived.
|
|
1174
|
-
</p>
|
|
1175
|
-
`}
|
|
1176
|
-
</div>
|
|
1177
|
-
<div class="issue-modal-footer">
|
|
1178
|
-
<button class="btn-secondary" onclick="hideMergeQueueModal()">Cancel</button>
|
|
1179
|
-
${otherQueues.length > 0 ? `
|
|
1180
|
-
<button class="btn-primary" onclick="executeQueueMerge('${safeSourceId}')">
|
|
1181
|
-
<i data-lucide="git-merge" class="w-4 h-4"></i>
|
|
1182
|
-
Merge
|
|
1183
|
-
</button>
|
|
1184
|
-
` : ''}
|
|
1185
|
-
</div>
|
|
1186
|
-
</div>
|
|
1187
|
-
`;
|
|
1188
|
-
|
|
1189
|
-
modal.classList.remove('hidden');
|
|
1190
|
-
lucide.createIcons();
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
function hideMergeQueueModal() {
|
|
1194
|
-
const modal = document.getElementById('mergeQueueModal');
|
|
1195
|
-
if (modal) {
|
|
1196
|
-
modal.classList.add('hidden');
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
async function executeQueueMerge(sourceQueueId) {
|
|
1201
|
-
const targetQueueId = document.getElementById('targetQueueSelect')?.value;
|
|
1202
|
-
if (!targetQueueId) return;
|
|
1203
|
-
|
|
1204
|
-
try {
|
|
1205
|
-
const response = await fetch('/api/queue/merge?path=' + encodeURIComponent(projectPath), {
|
|
1206
|
-
method: 'POST',
|
|
1207
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1208
|
-
body: JSON.stringify({ sourceQueueId, targetQueueId })
|
|
1209
|
-
});
|
|
1210
|
-
const result = await response.json();
|
|
1211
|
-
|
|
1212
|
-
if (result.success) {
|
|
1213
|
-
showNotification('Merged ' + result.mergedItemCount + ' items into ' + targetQueueId, 'success');
|
|
1214
|
-
hideMergeQueueModal();
|
|
1215
|
-
queueData.expandedQueueId = null;
|
|
1216
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
1217
|
-
renderIssueView();
|
|
1218
|
-
} else {
|
|
1219
|
-
showNotification(result.error || 'Failed to merge queues', 'error');
|
|
1220
|
-
}
|
|
1221
|
-
} catch (err) {
|
|
1222
|
-
console.error('Failed to merge queues:', err);
|
|
1223
|
-
showNotification('Failed to merge queues', 'error');
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
// ========== Queue Split Modal ==========
|
|
1228
|
-
async function showSplitQueueModal(queueId) {
|
|
1229
|
-
let modal = document.getElementById('splitQueueModal');
|
|
1230
|
-
if (!modal) {
|
|
1231
|
-
modal = document.createElement('div');
|
|
1232
|
-
modal.id = 'splitQueueModal';
|
|
1233
|
-
modal.className = 'issue-modal';
|
|
1234
|
-
document.body.appendChild(modal);
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
// Fetch queue details
|
|
1238
|
-
let queue;
|
|
1239
|
-
try {
|
|
1240
|
-
const response = await fetch('/api/queue/' + encodeURIComponent(queueId) + '?path=' + encodeURIComponent(projectPath));
|
|
1241
|
-
queue = await response.json();
|
|
1242
|
-
if (queue.error) throw new Error(queue.error);
|
|
1243
|
-
} catch (err) {
|
|
1244
|
-
showNotification('Failed to load queue details', 'error');
|
|
1245
|
-
return;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
const safeQueueId = escapeHtml(queueId || '');
|
|
1249
|
-
const items = queue.solutions || queue.tasks || [];
|
|
1250
|
-
const isSolutionLevel = !!queue.solutions;
|
|
1251
|
-
|
|
1252
|
-
// Group items by issue
|
|
1253
|
-
const issueGroups = {};
|
|
1254
|
-
items.forEach(item => {
|
|
1255
|
-
const issueId = item.issue_id || 'unknown';
|
|
1256
|
-
if (!issueGroups[issueId]) {
|
|
1257
|
-
issueGroups[issueId] = [];
|
|
1258
|
-
}
|
|
1259
|
-
issueGroups[issueId].push(item);
|
|
1260
|
-
});
|
|
1261
|
-
|
|
1262
|
-
const issueIds = Object.keys(issueGroups);
|
|
1263
|
-
|
|
1264
|
-
modal.innerHTML = `
|
|
1265
|
-
<div class="issue-modal-content split-queue-modal-content">
|
|
1266
|
-
<div class="issue-modal-header">
|
|
1267
|
-
<h3><i data-lucide="git-branch" class="w-5 h-5"></i> Split Queue: ${safeQueueId}</h3>
|
|
1268
|
-
<button class="issue-modal-close" onclick="hideSplitQueueModal()">
|
|
1269
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1270
|
-
</button>
|
|
1271
|
-
</div>
|
|
1272
|
-
|
|
1273
|
-
<div class="issue-modal-body">
|
|
1274
|
-
<p class="text-sm text-muted-foreground mb-4">
|
|
1275
|
-
Select issues and their solutions to split into a new queue. The remaining items will stay in the current queue.
|
|
1276
|
-
</p>
|
|
1277
|
-
|
|
1278
|
-
${issueIds.length === 0 ? `
|
|
1279
|
-
<p class="text-center text-muted-foreground py-4">No items to split</p>
|
|
1280
|
-
` : `
|
|
1281
|
-
<div class="split-queue-controls mb-3">
|
|
1282
|
-
<button class="btn-sm btn-secondary" onclick="selectAllIssues()">
|
|
1283
|
-
<i data-lucide="check-square" class="w-3 h-3"></i> Select All
|
|
1284
|
-
</button>
|
|
1285
|
-
<button class="btn-sm btn-secondary" onclick="deselectAllIssues()">
|
|
1286
|
-
<i data-lucide="square" class="w-3 h-3"></i> Deselect All
|
|
1287
|
-
</button>
|
|
1288
|
-
</div>
|
|
1289
|
-
|
|
1290
|
-
<div class="split-queue-issues">
|
|
1291
|
-
${issueIds.map(issueId => {
|
|
1292
|
-
const issueItems = issueGroups[issueId];
|
|
1293
|
-
const safeIssueId = escapeHtml(issueId);
|
|
1294
|
-
return `
|
|
1295
|
-
<div class="split-queue-issue-group" data-issue-id="${safeIssueId}">
|
|
1296
|
-
<div class="split-queue-issue-header">
|
|
1297
|
-
<label class="flex items-center gap-2">
|
|
1298
|
-
<input type="checkbox"
|
|
1299
|
-
class="issue-checkbox"
|
|
1300
|
-
data-issue-id="${safeIssueId}"
|
|
1301
|
-
onchange="toggleIssueSelection('${safeIssueId}')">
|
|
1302
|
-
<span class="font-medium">${safeIssueId}</span>
|
|
1303
|
-
<span class="text-xs text-muted-foreground">(${issueItems.length} ${isSolutionLevel ? 'solution' : 'task'}${issueItems.length > 1 ? 's' : ''})</span>
|
|
1304
|
-
</label>
|
|
1305
|
-
</div>
|
|
1306
|
-
<div class="split-queue-solutions ml-6">
|
|
1307
|
-
${issueItems.map(item => {
|
|
1308
|
-
const itemId = item.item_id || item.solution_id || item.task_id || '';
|
|
1309
|
-
const safeItemId = escapeHtml(itemId);
|
|
1310
|
-
const displayName = isSolutionLevel
|
|
1311
|
-
? (item.solution_id || itemId)
|
|
1312
|
-
: (item.task_id || itemId);
|
|
1313
|
-
return `
|
|
1314
|
-
<label class="flex items-center gap-2 py-1">
|
|
1315
|
-
<input type="checkbox"
|
|
1316
|
-
class="solution-checkbox"
|
|
1317
|
-
data-issue-id="${safeIssueId}"
|
|
1318
|
-
data-item-id="${safeItemId}"
|
|
1319
|
-
value="${safeItemId}">
|
|
1320
|
-
<span class="text-sm font-mono">${escapeHtml(displayName)}</span>
|
|
1321
|
-
${item.task_count ? `<span class="text-xs text-muted-foreground">(${item.task_count} tasks)</span>` : ''}
|
|
1322
|
-
</label>
|
|
1323
|
-
`;
|
|
1324
|
-
}).join('')}
|
|
1325
|
-
</div>
|
|
1326
|
-
</div>
|
|
1327
|
-
`;
|
|
1328
|
-
}).join('')}
|
|
1329
|
-
</div>
|
|
1330
|
-
`}
|
|
1331
|
-
</div>
|
|
1332
|
-
|
|
1333
|
-
<div class="issue-modal-footer">
|
|
1334
|
-
<button class="btn-secondary" onclick="hideSplitQueueModal()">Cancel</button>
|
|
1335
|
-
${issueIds.length > 0 ? `
|
|
1336
|
-
<button class="btn-primary" onclick="executeQueueSplit('${safeQueueId}')">
|
|
1337
|
-
<i data-lucide="git-branch" class="w-4 h-4"></i>
|
|
1338
|
-
<span>Split Queue</span>
|
|
1339
|
-
</button>
|
|
1340
|
-
` : ''}
|
|
1341
|
-
</div>
|
|
1342
|
-
</div>
|
|
1343
|
-
`;
|
|
1344
|
-
|
|
1345
|
-
modal.classList.remove('hidden');
|
|
1346
|
-
lucide.createIcons();
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function hideSplitQueueModal() {
|
|
1350
|
-
const modal = document.getElementById('splitQueueModal');
|
|
1351
|
-
if (modal) {
|
|
1352
|
-
modal.classList.add('hidden');
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
function toggleIssueSelection(issueId) {
|
|
1357
|
-
const issueCheckbox = document.querySelector(`.issue-checkbox[data-issue-id="${issueId}"]`);
|
|
1358
|
-
const solutionCheckboxes = document.querySelectorAll(`.solution-checkbox[data-issue-id="${issueId}"]`);
|
|
1359
|
-
|
|
1360
|
-
if (issueCheckbox && solutionCheckboxes) {
|
|
1361
|
-
solutionCheckboxes.forEach(cb => {
|
|
1362
|
-
cb.checked = issueCheckbox.checked;
|
|
1363
|
-
});
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
function selectAllIssues() {
|
|
1368
|
-
const allCheckboxes = document.querySelectorAll('.split-queue-modal-content input[type="checkbox"]');
|
|
1369
|
-
allCheckboxes.forEach(cb => cb.checked = true);
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
function deselectAllIssues() {
|
|
1373
|
-
const allCheckboxes = document.querySelectorAll('.split-queue-modal-content input[type="checkbox"]');
|
|
1374
|
-
allCheckboxes.forEach(cb => cb.checked = false);
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
async function executeQueueSplit(sourceQueueId) {
|
|
1378
|
-
const selectedCheckboxes = document.querySelectorAll('.solution-checkbox:checked');
|
|
1379
|
-
const selectedItemIds = Array.from(selectedCheckboxes).map(cb => cb.value);
|
|
1380
|
-
|
|
1381
|
-
if (selectedItemIds.length === 0) {
|
|
1382
|
-
showNotification('Please select at least one item to split', 'warning');
|
|
1383
|
-
return;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
try {
|
|
1387
|
-
const response = await fetch('/api/queue/split?path=' + encodeURIComponent(projectPath), {
|
|
1388
|
-
method: 'POST',
|
|
1389
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1390
|
-
body: JSON.stringify({ sourceQueueId, itemIds: selectedItemIds })
|
|
1391
|
-
});
|
|
1392
|
-
const result = await response.json();
|
|
1393
|
-
|
|
1394
|
-
if (result.success) {
|
|
1395
|
-
showNotification(`Split ${result.splitItemCount} items into new queue ${result.newQueueId}`, 'success');
|
|
1396
|
-
hideSplitQueueModal();
|
|
1397
|
-
queueData.expandedQueueId = null;
|
|
1398
|
-
await Promise.all([loadQueueData(), loadAllQueues()]);
|
|
1399
|
-
renderIssueView();
|
|
1400
|
-
} else {
|
|
1401
|
-
showNotification(result.error || 'Failed to split queue', 'error');
|
|
1402
|
-
}
|
|
1403
|
-
} catch (err) {
|
|
1404
|
-
console.error('Failed to split queue:', err);
|
|
1405
|
-
showNotification('Failed to split queue', 'error');
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
// ========== Legacy Queue Render (for backward compatibility) ==========
|
|
1410
|
-
function renderLegacyQueueSection() {
|
|
1411
|
-
const queue = issueData.queue;
|
|
1412
|
-
const queueItems = queue.solutions || queue.tasks || [];
|
|
1413
|
-
const isSolutionLevel = !!(queue.solutions && queue.solutions.length > 0);
|
|
1414
|
-
const metadata = queue._metadata || {};
|
|
1415
|
-
|
|
1416
|
-
if (queueItems.length === 0) {
|
|
1417
|
-
return `<div class="queue-empty"><p>Queue is empty</p></div>`;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
const groups = queue.execution_groups || [];
|
|
1421
|
-
let groupedItems = queue.grouped_items || {};
|
|
1422
|
-
|
|
1423
|
-
if (groups.length === 0 && queueItems.length > 0) {
|
|
1424
|
-
const groupMap = {};
|
|
1425
|
-
queueItems.forEach(item => {
|
|
1426
|
-
const groupId = item.execution_group || 'default';
|
|
1427
|
-
if (!groupMap[groupId]) {
|
|
1428
|
-
groupMap[groupId] = [];
|
|
1429
|
-
}
|
|
1430
|
-
groupMap[groupId].push(item);
|
|
1431
|
-
});
|
|
1432
|
-
|
|
1433
|
-
const syntheticGroups = Object.keys(groupMap).map(groupId => ({
|
|
1434
|
-
id: groupId,
|
|
1435
|
-
type: 'sequential',
|
|
1436
|
-
task_count: groupMap[groupId].length
|
|
1437
|
-
}));
|
|
1438
|
-
|
|
1439
|
-
return `
|
|
1440
|
-
<div class="queue-toolbar mb-4">
|
|
1441
|
-
<div class="queue-stats">
|
|
1442
|
-
<div class="queue-info-card">
|
|
1443
|
-
<span class="queue-info-label">${t('issues.queueId') || 'Queue ID'}</span>
|
|
1444
|
-
<span class="queue-info-value font-mono text-sm">${queue.id || 'N/A'}</span>
|
|
1445
|
-
</div>
|
|
1446
|
-
<div class="queue-info-card">
|
|
1447
|
-
<span class="queue-info-label">${t('issues.status') || 'Status'}</span>
|
|
1448
|
-
<span class="queue-status-badge ${queue.status || ''}">${queue.status || 'unknown'}</span>
|
|
1449
|
-
</div>
|
|
1450
|
-
<div class="queue-info-card">
|
|
1451
|
-
<span class="queue-info-label">${t('issues.issues') || 'Issues'}</span>
|
|
1452
|
-
<span class="queue-info-value">${(queue.issue_ids || []).join(', ') || 'N/A'}</span>
|
|
1453
|
-
</div>
|
|
1454
|
-
</div>
|
|
1455
|
-
<div class="queue-actions">
|
|
1456
|
-
<button class="btn-secondary" onclick="refreshQueue()" title="${t('issues.refreshQueue') || 'Refresh'}">
|
|
1457
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
1458
|
-
</button>
|
|
1459
|
-
<button class="btn-secondary" onclick="showQueueHistoryModal()" title="${t('issues.queueHistory') || 'Queue History'}">
|
|
1460
|
-
<i data-lucide="history" class="w-4 h-4"></i>
|
|
1461
|
-
<span>${t('issues.history') || 'History'}</span>
|
|
1462
|
-
</button>
|
|
1463
|
-
<button class="btn-secondary" onclick="createExecutionQueue()" title="${t('issues.regenerateQueue') || 'Regenerate Queue'}">
|
|
1464
|
-
<i data-lucide="rotate-cw" class="w-4 h-4"></i>
|
|
1465
|
-
<span>${t('issues.regenerate') || 'Regenerate'}</span>
|
|
1466
|
-
</button>
|
|
1467
|
-
</div>
|
|
1468
|
-
</div>
|
|
1469
|
-
|
|
1470
|
-
<!-- Queue Stats -->
|
|
1471
|
-
<div class="queue-stats-grid mb-4">
|
|
1472
|
-
<div class="queue-stat-card">
|
|
1473
|
-
<span class="queue-stat-value">${isSolutionLevel ? (metadata.total_solutions || queueItems.length) : (metadata.total_tasks || queueItems.length)}</span>
|
|
1474
|
-
<span class="queue-stat-label">${isSolutionLevel ? (t('issues.totalSolutions') || 'Solutions') : (t('issues.totalTasks') || 'Total')}</span>
|
|
1475
|
-
</div>
|
|
1476
|
-
<div class="queue-stat-card pending">
|
|
1477
|
-
<span class="queue-stat-value">${metadata.pending_count || queueItems.filter(i => i.status === 'pending').length}</span>
|
|
1478
|
-
<span class="queue-stat-label">${t('issues.pending') || 'Pending'}</span>
|
|
1479
|
-
</div>
|
|
1480
|
-
<div class="queue-stat-card executing">
|
|
1481
|
-
<span class="queue-stat-value">${metadata.executing_count || queueItems.filter(i => i.status === 'executing').length}</span>
|
|
1482
|
-
<span class="queue-stat-label">${t('issues.executing') || 'Executing'}</span>
|
|
1483
|
-
</div>
|
|
1484
|
-
<div class="queue-stat-card completed">
|
|
1485
|
-
<span class="queue-stat-value">${metadata.completed_count || queueItems.filter(i => i.status === 'completed').length}</span>
|
|
1486
|
-
<span class="queue-stat-label">${t('issues.completed') || 'Completed'}</span>
|
|
1487
|
-
</div>
|
|
1488
|
-
<div class="queue-stat-card failed">
|
|
1489
|
-
<span class="queue-stat-value">${metadata.failed_count || queueItems.filter(i => i.status === 'failed').length}</span>
|
|
1490
|
-
<span class="queue-stat-label">${t('issues.failed') || 'Failed'}</span>
|
|
1491
|
-
</div>
|
|
1492
|
-
</div>
|
|
1493
|
-
|
|
1494
|
-
<!-- Queue Items -->
|
|
1495
|
-
<div class="queue-timeline">
|
|
1496
|
-
${syntheticGroups.map(group => renderQueueGroup(group, groupMap[group.id] || [])).join('')}
|
|
1497
|
-
</div>
|
|
1498
|
-
|
|
1499
|
-
${queue.conflicts && queue.conflicts.length > 0 ? renderConflictsSection(queue.conflicts) : ''}
|
|
1500
|
-
`;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
return `
|
|
1504
|
-
<!-- Queue Toolbar -->
|
|
1505
|
-
<div class="queue-toolbar mb-4">
|
|
1506
|
-
<div class="queue-stats">
|
|
1507
|
-
<span class="text-sm text-muted-foreground">
|
|
1508
|
-
${groups.length} ${t('issues.executionGroups') || 'groups'} ·
|
|
1509
|
-
${queueItems.length} ${t('issues.totalItems') || 'items'}
|
|
1510
|
-
</span>
|
|
1511
|
-
</div>
|
|
1512
|
-
<div class="queue-actions">
|
|
1513
|
-
<button class="btn-secondary" onclick="refreshQueue()" title="${t('issues.refreshQueue') || 'Refresh'}">
|
|
1514
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
1515
|
-
</button>
|
|
1516
|
-
<button class="btn-secondary" onclick="createExecutionQueue()" title="${t('issues.regenerateQueue') || 'Regenerate Queue'}">
|
|
1517
|
-
<i data-lucide="rotate-cw" class="w-4 h-4"></i>
|
|
1518
|
-
<span>${t('issues.regenerate') || 'Regenerate'}</span>
|
|
1519
|
-
</button>
|
|
1520
|
-
</div>
|
|
1521
|
-
</div>
|
|
1522
|
-
|
|
1523
|
-
<div class="queue-info mb-4">
|
|
1524
|
-
<p class="text-sm text-muted-foreground">
|
|
1525
|
-
<i data-lucide="info" class="w-4 h-4 inline mr-1"></i>
|
|
1526
|
-
${t('issues.reorderHint') || 'Drag items within a group to reorder'}
|
|
1527
|
-
</p>
|
|
1528
|
-
</div>
|
|
1529
|
-
|
|
1530
|
-
<div class="queue-timeline">
|
|
1531
|
-
${groups.map(group => renderQueueGroup(group, groupedItems[group.id] || [])).join('')}
|
|
1532
|
-
</div>
|
|
1533
|
-
|
|
1534
|
-
${queue.conflicts && queue.conflicts.length > 0 ? renderConflictsSection(queue.conflicts) : ''}
|
|
1535
|
-
`;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
function renderQueueGroup(group, items) {
|
|
1539
|
-
const isParallel = group.type === 'parallel';
|
|
1540
|
-
// Support both solution-level (solution_count) and task-level (task_count)
|
|
1541
|
-
const itemCount = group.solution_count || group.task_count || items.length;
|
|
1542
|
-
const itemLabel = group.solution_count ? 'solutions' : 'tasks';
|
|
1543
|
-
|
|
1544
|
-
return `
|
|
1545
|
-
<div class="queue-group" data-group-id="${group.id}">
|
|
1546
|
-
<div class="queue-group-header">
|
|
1547
|
-
<div class="queue-group-type ${isParallel ? 'parallel' : 'sequential'}">
|
|
1548
|
-
<i data-lucide="${isParallel ? 'git-merge' : 'arrow-right'}" class="w-4 h-4"></i>
|
|
1549
|
-
${group.id} (${isParallel ? t('issues.parallelGroup') || 'Parallel' : t('issues.sequentialGroup') || 'Sequential'})
|
|
1550
|
-
</div>
|
|
1551
|
-
<span class="text-sm text-muted-foreground">${itemCount} ${itemLabel}</span>
|
|
1552
|
-
</div>
|
|
1553
|
-
<div class="queue-items ${isParallel ? 'parallel' : 'sequential'}">
|
|
1554
|
-
${items.map((item, idx) => renderQueueItem(item, idx, items.length)).join('')}
|
|
1555
|
-
</div>
|
|
1556
|
-
</div>
|
|
1557
|
-
`;
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
function renderQueueItem(item, index, total) {
|
|
1561
|
-
const statusColors = {
|
|
1562
|
-
pending: '',
|
|
1563
|
-
ready: 'ready',
|
|
1564
|
-
executing: 'executing',
|
|
1565
|
-
completed: 'completed',
|
|
1566
|
-
failed: 'failed',
|
|
1567
|
-
blocked: 'blocked'
|
|
1568
|
-
};
|
|
1569
|
-
|
|
1570
|
-
// Check if this is a solution-level item (has task_count) or task-level (has task_id)
|
|
1571
|
-
const isSolutionItem = item.task_count !== undefined;
|
|
1572
|
-
|
|
1573
|
-
return `
|
|
1574
|
-
<div class="queue-item ${statusColors[item.status] || ''}"
|
|
1575
|
-
draggable="true"
|
|
1576
|
-
data-item-id="${item.item_id}"
|
|
1577
|
-
data-group-id="${item.execution_group}"
|
|
1578
|
-
onclick="openQueueItemDetail('${item.item_id}')">
|
|
1579
|
-
<span class="queue-item-id font-mono text-xs">${item.item_id}</span>
|
|
1580
|
-
<span class="queue-item-issue text-xs text-muted-foreground">${item.issue_id}</span>
|
|
1581
|
-
${isSolutionItem ? `
|
|
1582
|
-
<span class="queue-item-solution text-sm" title="${item.solution_id || ''}">
|
|
1583
|
-
<i data-lucide="package" class="w-3 h-3 inline mr-1"></i>
|
|
1584
|
-
${item.task_count} ${t('issues.tasks') || 'tasks'}
|
|
1585
|
-
</span>
|
|
1586
|
-
${item.files_touched && item.files_touched.length > 0 ? `
|
|
1587
|
-
<span class="queue-item-files text-xs text-muted-foreground" title="${item.files_touched.join(', ')}">
|
|
1588
|
-
<i data-lucide="file" class="w-3 h-3"></i>
|
|
1589
|
-
${item.files_touched.length}
|
|
1590
|
-
</span>
|
|
1591
|
-
` : ''}
|
|
1592
|
-
` : `
|
|
1593
|
-
<span class="queue-item-task text-sm">${item.task_id || '-'}</span>
|
|
1594
|
-
`}
|
|
1595
|
-
<span class="queue-item-priority" style="opacity: ${item.semantic_priority || 0.5}">
|
|
1596
|
-
<i data-lucide="arrow-up" class="w-3 h-3"></i>
|
|
1597
|
-
</span>
|
|
1598
|
-
${item.depends_on && item.depends_on.length > 0 ? `
|
|
1599
|
-
<span class="queue-item-deps text-xs text-muted-foreground" title="${t('issues.dependsOn') || 'Depends on'}: ${item.depends_on.join(', ')}">
|
|
1600
|
-
<i data-lucide="link" class="w-3 h-3"></i>
|
|
1601
|
-
</span>
|
|
1602
|
-
` : ''}
|
|
1603
|
-
</div>
|
|
1604
|
-
`;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
function renderConflictsSection(conflicts) {
|
|
1608
|
-
return `
|
|
1609
|
-
<div class="conflicts-section mt-6">
|
|
1610
|
-
<h3 class="text-sm font-semibold text-foreground mb-3">
|
|
1611
|
-
<i data-lucide="alert-triangle" class="w-4 h-4 inline text-warning mr-1"></i>
|
|
1612
|
-
Conflicts (${conflicts.length})
|
|
1613
|
-
</h3>
|
|
1614
|
-
<div class="conflicts-list">
|
|
1615
|
-
${conflicts.map(c => `
|
|
1616
|
-
<div class="conflict-item">
|
|
1617
|
-
<span class="conflict-file font-mono text-xs">${c.file}</span>
|
|
1618
|
-
<span class="conflict-items text-xs text-muted-foreground">${(c.solutions || c.tasks || []).join(' → ')}</span>
|
|
1619
|
-
${c.rationale ? `<span class="conflict-rationale text-xs text-muted-foreground" title="${c.rationale}">
|
|
1620
|
-
<i data-lucide="info" class="w-3 h-3"></i>
|
|
1621
|
-
</span>` : ''}
|
|
1622
|
-
<span class="conflict-status ${c.resolved || c.resolution ? 'resolved' : 'pending'}">
|
|
1623
|
-
${c.resolved || c.resolution ? 'Resolved' : 'Pending'}
|
|
1624
|
-
</span>
|
|
1625
|
-
</div>
|
|
1626
|
-
`).join('')}
|
|
1627
|
-
</div>
|
|
1628
|
-
</div>
|
|
1629
|
-
`;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
// ========== Drag-Drop for Queue ==========
|
|
1633
|
-
function initQueueDragDrop() {
|
|
1634
|
-
const items = document.querySelectorAll('.queue-item[draggable="true"]');
|
|
1635
|
-
|
|
1636
|
-
items.forEach(item => {
|
|
1637
|
-
item.addEventListener('dragstart', handleIssueDragStart);
|
|
1638
|
-
item.addEventListener('dragend', handleIssueDragEnd);
|
|
1639
|
-
item.addEventListener('dragover', handleIssueDragOver);
|
|
1640
|
-
item.addEventListener('drop', handleIssueDrop);
|
|
1641
|
-
});
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
function handleIssueDragStart(e) {
|
|
1645
|
-
const item = e.target.closest('.queue-item');
|
|
1646
|
-
if (!item) return;
|
|
1647
|
-
|
|
1648
|
-
issueDragState.dragging = item.dataset.itemId;
|
|
1649
|
-
issueDragState.groupId = item.dataset.groupId;
|
|
1650
|
-
|
|
1651
|
-
item.classList.add('dragging');
|
|
1652
|
-
e.dataTransfer.effectAllowed = 'move';
|
|
1653
|
-
e.dataTransfer.setData('text/plain', item.dataset.itemId);
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
function handleIssueDragEnd(e) {
|
|
1657
|
-
const item = e.target.closest('.queue-item');
|
|
1658
|
-
if (item) {
|
|
1659
|
-
item.classList.remove('dragging');
|
|
1660
|
-
}
|
|
1661
|
-
issueDragState.dragging = null;
|
|
1662
|
-
issueDragState.groupId = null;
|
|
1663
|
-
|
|
1664
|
-
// Remove all placeholders
|
|
1665
|
-
document.querySelectorAll('.queue-drop-placeholder').forEach(p => p.remove());
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
function handleIssueDragOver(e) {
|
|
1669
|
-
e.preventDefault();
|
|
1670
|
-
|
|
1671
|
-
const target = e.target.closest('.queue-item');
|
|
1672
|
-
if (!target || target.dataset.itemId === issueDragState.dragging) return;
|
|
1673
|
-
|
|
1674
|
-
// Only allow drag within same group
|
|
1675
|
-
if (target.dataset.groupId !== issueDragState.groupId) {
|
|
1676
|
-
e.dataTransfer.dropEffect = 'none';
|
|
1677
|
-
return;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
e.dataTransfer.dropEffect = 'move';
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
function handleIssueDrop(e) {
|
|
1684
|
-
e.preventDefault();
|
|
1685
|
-
|
|
1686
|
-
const target = e.target.closest('.queue-item');
|
|
1687
|
-
if (!target || !issueDragState.dragging) return;
|
|
1688
|
-
|
|
1689
|
-
// Only allow drop within same group
|
|
1690
|
-
if (target.dataset.groupId !== issueDragState.groupId) return;
|
|
1691
|
-
|
|
1692
|
-
const container = target.closest('.queue-items');
|
|
1693
|
-
if (!container) return;
|
|
1694
|
-
|
|
1695
|
-
// Get new order
|
|
1696
|
-
const items = Array.from(container.querySelectorAll('.queue-item'));
|
|
1697
|
-
const draggedItem = items.find(i => i.dataset.itemId === issueDragState.dragging);
|
|
1698
|
-
const targetIndex = items.indexOf(target);
|
|
1699
|
-
const draggedIndex = items.indexOf(draggedItem);
|
|
1700
|
-
|
|
1701
|
-
if (draggedIndex === targetIndex) return;
|
|
1702
|
-
|
|
1703
|
-
// Reorder in DOM
|
|
1704
|
-
if (draggedIndex < targetIndex) {
|
|
1705
|
-
target.after(draggedItem);
|
|
1706
|
-
} else {
|
|
1707
|
-
target.before(draggedItem);
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
// Get new order and save
|
|
1711
|
-
const newOrder = Array.from(container.querySelectorAll('.queue-item')).map(i => i.dataset.itemId);
|
|
1712
|
-
saveQueueOrder(issueDragState.groupId, newOrder);
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
async function saveQueueOrder(groupId, newOrder) {
|
|
1716
|
-
try {
|
|
1717
|
-
const response = await fetch('/api/queue/reorder?path=' + encodeURIComponent(projectPath), {
|
|
1718
|
-
method: 'POST',
|
|
1719
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1720
|
-
body: JSON.stringify({ groupId, newOrder })
|
|
1721
|
-
});
|
|
1722
|
-
|
|
1723
|
-
if (!response.ok) {
|
|
1724
|
-
throw new Error('Failed to save queue order');
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
const result = await response.json();
|
|
1728
|
-
if (result.error) {
|
|
1729
|
-
showNotification(result.error, 'error');
|
|
1730
|
-
} else {
|
|
1731
|
-
showNotification('Queue reordered', 'success');
|
|
1732
|
-
// Reload queue data
|
|
1733
|
-
await loadQueueData();
|
|
1734
|
-
}
|
|
1735
|
-
} catch (err) {
|
|
1736
|
-
console.error('Failed to save queue order:', err);
|
|
1737
|
-
showNotification('Failed to save queue order', 'error');
|
|
1738
|
-
// Reload to restore original order
|
|
1739
|
-
await loadQueueData();
|
|
1740
|
-
renderIssueView();
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
// ========== Detail Panel ==========
|
|
1745
|
-
async function openIssueDetail(issueId, isArchived = false) {
|
|
1746
|
-
const panel = document.getElementById('issueDetailPanel');
|
|
1747
|
-
if (!panel) return;
|
|
1748
|
-
|
|
1749
|
-
panel.innerHTML = '<div class="p-8 text-center"><i data-lucide="loader-2" class="w-8 h-8 animate-spin mx-auto"></i></div>';
|
|
1750
|
-
panel.classList.remove('hidden');
|
|
1751
|
-
lucide.createIcons();
|
|
1752
|
-
|
|
1753
|
-
let detail;
|
|
1754
|
-
if (isArchived) {
|
|
1755
|
-
// For archived issues, get detail from historyIssues (already loaded)
|
|
1756
|
-
const historyIssue = issueData.historyIssues.find(i => i.id === issueId);
|
|
1757
|
-
if (historyIssue) {
|
|
1758
|
-
// Mark as archived and provide minimal detail structure
|
|
1759
|
-
detail = {
|
|
1760
|
-
...historyIssue,
|
|
1761
|
-
_isArchived: true,
|
|
1762
|
-
solutions: historyIssue.solutions || [],
|
|
1763
|
-
tasks: historyIssue.tasks || []
|
|
1764
|
-
};
|
|
1765
|
-
}
|
|
1766
|
-
} else {
|
|
1767
|
-
detail = await loadIssueDetail(issueId);
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
if (!detail) {
|
|
1771
|
-
panel.innerHTML = '<div class="p-8 text-center text-destructive">Failed to load issue</div>';
|
|
1772
|
-
return;
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
issueData.selectedIssue = detail;
|
|
1776
|
-
renderIssueDetailPanel(detail);
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
function renderIssueDetailPanel(issue) {
|
|
1780
|
-
const panel = document.getElementById('issueDetailPanel');
|
|
1781
|
-
if (!panel) return;
|
|
1782
|
-
|
|
1783
|
-
const boundSolution = issue.solutions?.find(s => s.is_bound);
|
|
1784
|
-
|
|
1785
|
-
panel.innerHTML = `
|
|
1786
|
-
<div class="issue-detail-header">
|
|
1787
|
-
<div class="flex items-center justify-between">
|
|
1788
|
-
<h3 class="text-lg font-semibold">${issue.id}</h3>
|
|
1789
|
-
<button class="btn-icon" onclick="closeIssueDetail()">
|
|
1790
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1791
|
-
</button>
|
|
1792
|
-
</div>
|
|
1793
|
-
<span class="issue-status ${issue.status || ''}">${issue.status || 'unknown'}</span>
|
|
1794
|
-
</div>
|
|
1795
|
-
|
|
1796
|
-
<div class="issue-detail-content">
|
|
1797
|
-
<!-- Title (editable) -->
|
|
1798
|
-
<div class="detail-section">
|
|
1799
|
-
<label class="detail-label">Title</label>
|
|
1800
|
-
<div class="detail-editable" id="issueTitle">
|
|
1801
|
-
<span class="detail-value">${issue.title || issue.id}</span>
|
|
1802
|
-
<button class="btn-edit" onclick="startEditField('${issue.id}', 'title', '${(issue.title || issue.id).replace(/'/g, "\\'")}')">
|
|
1803
|
-
<i data-lucide="pencil" class="w-3.5 h-3.5"></i>
|
|
1804
|
-
</button>
|
|
1805
|
-
</div>
|
|
1806
|
-
</div>
|
|
1807
|
-
|
|
1808
|
-
<!-- Context (editable) -->
|
|
1809
|
-
<div class="detail-section">
|
|
1810
|
-
<label class="detail-label">Context</label>
|
|
1811
|
-
<div class="detail-context" id="issueContext">
|
|
1812
|
-
<pre class="detail-pre">${issue.context || 'No context'}</pre>
|
|
1813
|
-
<button class="btn-edit" onclick="startEditContext('${issue.id}')">
|
|
1814
|
-
<i data-lucide="pencil" class="w-3.5 h-3.5"></i>
|
|
1815
|
-
</button>
|
|
1816
|
-
</div>
|
|
1817
|
-
</div>
|
|
1818
|
-
|
|
1819
|
-
<!-- Failure History -->
|
|
1820
|
-
${renderFailureHistoryDetail(issue)}
|
|
1821
|
-
|
|
1822
|
-
<!-- Solutions -->
|
|
1823
|
-
<div class="detail-section">
|
|
1824
|
-
<label class="detail-label">${t('issues.solutions') || 'Solutions'} (${issue.solutions?.length || 0})</label>
|
|
1825
|
-
<div class="solutions-list">
|
|
1826
|
-
${(issue.solutions || []).length > 0 ? (issue.solutions || []).map(sol => `
|
|
1827
|
-
<div class="solution-item ${sol.is_bound ? 'bound' : ''}" onclick="openSolutionDetail('${issue.id}', '${sol.id}')">
|
|
1828
|
-
<div class="solution-header">
|
|
1829
|
-
<span class="solution-id font-mono text-xs">${sol.id}</span>
|
|
1830
|
-
${sol.is_bound ? '<span class="solution-bound-badge">' + (t('issues.bound') || 'Bound') + '</span>' : ''}
|
|
1831
|
-
<span class="solution-tasks text-xs">${sol.tasks?.length || 0} ${t('issues.tasks') || 'tasks'}</span>
|
|
1832
|
-
<i data-lucide="chevron-right" class="w-4 h-4 ml-auto text-muted-foreground"></i>
|
|
1833
|
-
</div>
|
|
1834
|
-
</div>
|
|
1835
|
-
`).join('') : '<p class="text-sm text-muted-foreground">' + (t('issues.noSolutions') || 'No solutions') + '</p>'}
|
|
1836
|
-
</div>
|
|
1837
|
-
</div>
|
|
1838
|
-
|
|
1839
|
-
<!-- Tasks (from tasks.jsonl) -->
|
|
1840
|
-
<div class="detail-section">
|
|
1841
|
-
<label class="detail-label">${t('issues.tasks') || 'Tasks'} (${issue.tasks?.length || 0})</label>
|
|
1842
|
-
<div class="tasks-list">
|
|
1843
|
-
${(issue.tasks || []).length > 0 ? (issue.tasks || []).map(task => `
|
|
1844
|
-
<div class="task-item-detail">
|
|
1845
|
-
<div class="flex items-center justify-between">
|
|
1846
|
-
<span class="font-mono text-sm">${task.id}</span>
|
|
1847
|
-
<select class="task-status-select" onchange="updateTaskStatus('${issue.id}', '${task.id}', this.value)">
|
|
1848
|
-
${['pending', 'ready', 'executing', 'completed', 'failed', 'blocked', 'paused', 'skipped'].map(s =>
|
|
1849
|
-
`<option value="${s}" ${task.status === s ? 'selected' : ''}>${s}</option>`
|
|
1850
|
-
).join('')}
|
|
1851
|
-
</select>
|
|
1852
|
-
</div>
|
|
1853
|
-
<p class="task-title-detail">${task.title || task.description || ''}</p>
|
|
1854
|
-
</div>
|
|
1855
|
-
`).join('') : '<p class="text-sm text-muted-foreground">' + (t('issues.noTasks') || 'No tasks') + '</p>'}
|
|
1856
|
-
</div>
|
|
1857
|
-
</div>
|
|
1858
|
-
|
|
1859
|
-
<!-- Actions -->
|
|
1860
|
-
<div class="detail-section issue-detail-actions">
|
|
1861
|
-
<label class="detail-label">${t('issues.actions') || 'Actions'}</label>
|
|
1862
|
-
<div class="flex gap-2 flex-wrap">
|
|
1863
|
-
${!issue._isArchived ? `
|
|
1864
|
-
<button class="btn-secondary btn-sm" onclick="confirmArchiveIssue('${issue.id}')">
|
|
1865
|
-
<i data-lucide="archive" class="w-4 h-4"></i>
|
|
1866
|
-
${t('issues.archive') || 'Archive'}
|
|
1867
|
-
</button>
|
|
1868
|
-
` : ''}
|
|
1869
|
-
<button class="btn-secondary btn-sm btn-danger" onclick="confirmDeleteIssue('${issue.id}', ${issue._isArchived || false})">
|
|
1870
|
-
<i data-lucide="trash-2" class="w-4 h-4"></i>
|
|
1871
|
-
${t('issues.delete') || 'Delete'}
|
|
1872
|
-
</button>
|
|
1873
|
-
</div>
|
|
1874
|
-
</div>
|
|
1875
|
-
</div>
|
|
1876
|
-
`;
|
|
1877
|
-
|
|
1878
|
-
lucide.createIcons();
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
function closeIssueDetail() {
|
|
1882
|
-
const panel = document.getElementById('issueDetailPanel');
|
|
1883
|
-
if (panel) {
|
|
1884
|
-
panel.classList.add('hidden');
|
|
1885
|
-
}
|
|
1886
|
-
issueData.selectedIssue = null;
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
// ========== Issue Delete & Archive ==========
|
|
1890
|
-
function confirmDeleteIssue(issueId, isArchived) {
|
|
1891
|
-
const msg = t('issues.confirmDeleteIssue') || 'Are you sure you want to delete this issue? This action cannot be undone.';
|
|
1892
|
-
if (confirm(msg)) {
|
|
1893
|
-
deleteIssue(issueId, isArchived);
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
async function deleteIssue(issueId, isArchived) {
|
|
1898
|
-
try {
|
|
1899
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
1900
|
-
method: 'DELETE'
|
|
1901
|
-
});
|
|
1902
|
-
const result = await response.json();
|
|
1903
|
-
if (result.success) {
|
|
1904
|
-
showNotification(t('issues.issueDeleted') || 'Issue deleted successfully', 'success');
|
|
1905
|
-
closeIssueDetail();
|
|
1906
|
-
if (isArchived) {
|
|
1907
|
-
issueData.historyIssues = issueData.historyIssues.filter(i => i.id !== issueId);
|
|
1908
|
-
} else {
|
|
1909
|
-
issueData.issues = issueData.issues.filter(i => i.id !== issueId);
|
|
1910
|
-
}
|
|
1911
|
-
renderIssueView();
|
|
1912
|
-
updateIssueBadge();
|
|
1913
|
-
} else {
|
|
1914
|
-
showNotification(result.error || 'Failed to delete issue', 'error');
|
|
1915
|
-
}
|
|
1916
|
-
} catch (err) {
|
|
1917
|
-
console.error('Failed to delete issue:', err);
|
|
1918
|
-
showNotification('Failed to delete issue', 'error');
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
function confirmArchiveIssue(issueId) {
|
|
1923
|
-
const msg = t('issues.confirmArchiveIssue') || 'Archive this issue? It will be moved to history.';
|
|
1924
|
-
if (confirm(msg)) {
|
|
1925
|
-
archiveIssue(issueId);
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
async function archiveIssue(issueId) {
|
|
1930
|
-
try {
|
|
1931
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '/archive?path=' + encodeURIComponent(projectPath), {
|
|
1932
|
-
method: 'POST'
|
|
1933
|
-
});
|
|
1934
|
-
const result = await response.json();
|
|
1935
|
-
if (result.success) {
|
|
1936
|
-
showNotification(t('issues.issueArchived') || 'Issue archived successfully', 'success');
|
|
1937
|
-
closeIssueDetail();
|
|
1938
|
-
await loadIssueData();
|
|
1939
|
-
renderIssueView();
|
|
1940
|
-
updateIssueBadge();
|
|
1941
|
-
} else {
|
|
1942
|
-
showNotification(result.error || 'Failed to archive issue', 'error');
|
|
1943
|
-
}
|
|
1944
|
-
} catch (err) {
|
|
1945
|
-
console.error('Failed to archive issue:', err);
|
|
1946
|
-
showNotification('Failed to archive issue', 'error');
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
function toggleSolutionExpand(solId) {
|
|
1951
|
-
const el = document.getElementById('solution-' + solId);
|
|
1952
|
-
if (el) {
|
|
1953
|
-
el.classList.toggle('hidden');
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
// ========== Solution Detail Modal ==========
|
|
1958
|
-
function openSolutionDetail(issueId, solutionId) {
|
|
1959
|
-
const issue = issueData.selectedIssue || issueData.issues.find(i => i.id === issueId);
|
|
1960
|
-
if (!issue) return;
|
|
1961
|
-
|
|
1962
|
-
const solution = issue.solutions?.find(s => s.id === solutionId);
|
|
1963
|
-
if (!solution) return;
|
|
1964
|
-
|
|
1965
|
-
issueData.selectedSolution = solution;
|
|
1966
|
-
issueData.selectedSolutionIssueId = issueId;
|
|
1967
|
-
|
|
1968
|
-
const modal = document.getElementById('solutionDetailModal');
|
|
1969
|
-
if (modal) {
|
|
1970
|
-
modal.classList.remove('hidden');
|
|
1971
|
-
renderSolutionDetail(solution);
|
|
1972
|
-
lucide.createIcons();
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
function closeSolutionDetail() {
|
|
1977
|
-
const modal = document.getElementById('solutionDetailModal');
|
|
1978
|
-
if (modal) {
|
|
1979
|
-
modal.classList.add('hidden');
|
|
1980
|
-
}
|
|
1981
|
-
issueData.selectedSolution = null;
|
|
1982
|
-
issueData.selectedSolutionIssueId = null;
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
function renderSolutionDetail(solution) {
|
|
1986
|
-
const idEl = document.getElementById('solutionDetailId');
|
|
1987
|
-
const bodyEl = document.getElementById('solutionDetailBody');
|
|
1988
|
-
const bindBtn = document.getElementById('solutionBindBtn');
|
|
1989
|
-
|
|
1990
|
-
if (idEl) {
|
|
1991
|
-
idEl.textContent = solution.id;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
// Update bind button state
|
|
1995
|
-
if (bindBtn) {
|
|
1996
|
-
if (solution.is_bound) {
|
|
1997
|
-
bindBtn.innerHTML = `<i data-lucide="unlink" class="w-4 h-4"></i><span>${t('issues.unbind') || 'Unbind'}</span>`;
|
|
1998
|
-
bindBtn.classList.remove('btn-secondary');
|
|
1999
|
-
bindBtn.classList.add('btn-primary');
|
|
2000
|
-
} else {
|
|
2001
|
-
bindBtn.innerHTML = `<i data-lucide="link" class="w-4 h-4"></i><span>${t('issues.bind') || 'Bind'}</span>`;
|
|
2002
|
-
bindBtn.classList.remove('btn-primary');
|
|
2003
|
-
bindBtn.classList.add('btn-secondary');
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
if (!bodyEl) return;
|
|
2008
|
-
|
|
2009
|
-
const tasks = solution.tasks || [];
|
|
2010
|
-
|
|
2011
|
-
bodyEl.innerHTML = `
|
|
2012
|
-
<!-- Solution Overview -->
|
|
2013
|
-
<div class="solution-detail-section">
|
|
2014
|
-
<div class="solution-overview">
|
|
2015
|
-
<div class="solution-stat">
|
|
2016
|
-
<span class="solution-stat-value">${tasks.length}</span>
|
|
2017
|
-
<span class="solution-stat-label">${t('issues.totalTasks') || 'Total Tasks'}</span>
|
|
2018
|
-
</div>
|
|
2019
|
-
<div class="solution-stat">
|
|
2020
|
-
<span class="solution-stat-value">${solution.is_bound ? '✓' : '—'}</span>
|
|
2021
|
-
<span class="solution-stat-label">${t('issues.bindStatus') || 'Bind Status'}</span>
|
|
2022
|
-
</div>
|
|
2023
|
-
<div class="solution-stat">
|
|
2024
|
-
<span class="solution-stat-value">${solution.created_at ? new Date(solution.created_at).toLocaleDateString() : '—'}</span>
|
|
2025
|
-
<span class="solution-stat-label">${t('issues.createdAt') || 'Created'}</span>
|
|
2026
|
-
</div>
|
|
2027
|
-
</div>
|
|
2028
|
-
</div>
|
|
2029
|
-
|
|
2030
|
-
<!-- Tasks List -->
|
|
2031
|
-
<div class="solution-detail-section">
|
|
2032
|
-
<h4 class="solution-detail-section-title">
|
|
2033
|
-
<i data-lucide="list-checks" class="w-4 h-4"></i>
|
|
2034
|
-
${t('issues.taskList') || 'Task List'}
|
|
2035
|
-
</h4>
|
|
2036
|
-
<div class="solution-tasks-detail">
|
|
2037
|
-
${tasks.length === 0 ? `
|
|
2038
|
-
<p class="text-sm text-muted-foreground text-center py-4">${t('issues.noTasks') || 'No tasks in this solution'}</p>
|
|
2039
|
-
` : tasks.map((task, index) => renderSolutionTask(task, index)).join('')}
|
|
2040
|
-
</div>
|
|
2041
|
-
</div>
|
|
2042
|
-
|
|
2043
|
-
<!-- Raw JSON (collapsible) -->
|
|
2044
|
-
<div class="solution-detail-section">
|
|
2045
|
-
<button class="solution-json-toggle" onclick="toggleSolutionJson()">
|
|
2046
|
-
<i data-lucide="code" class="w-4 h-4"></i>
|
|
2047
|
-
<span>${t('issues.viewJson') || 'View Raw JSON'}</span>
|
|
2048
|
-
<i data-lucide="chevron-down" class="w-4 h-4 ml-auto"></i>
|
|
2049
|
-
</button>
|
|
2050
|
-
<div id="solutionJsonContent" class="solution-json-content hidden">
|
|
2051
|
-
<pre class="solution-json-pre">${escapeHtml(JSON.stringify(solution, null, 2))}</pre>
|
|
2052
|
-
</div>
|
|
2053
|
-
</div>
|
|
2054
|
-
`;
|
|
2055
|
-
|
|
2056
|
-
lucide.createIcons();
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
function renderSolutionTask(task, index) {
|
|
2060
|
-
const actionClass = (task.action || 'unknown').toLowerCase();
|
|
2061
|
-
const modPoints = task.modification_points || [];
|
|
2062
|
-
// Support both old and new field names
|
|
2063
|
-
const implSteps = task.implementation || task.implementation_steps || [];
|
|
2064
|
-
const acceptance = task.acceptance || task.acceptance_criteria || [];
|
|
2065
|
-
const testInfo = task.test || {};
|
|
2066
|
-
const regression = task.regression || [];
|
|
2067
|
-
const commitInfo = task.commit || {};
|
|
2068
|
-
const dependsOn = task.depends_on || task.dependencies || [];
|
|
2069
|
-
|
|
2070
|
-
// Handle acceptance as object or array
|
|
2071
|
-
const acceptanceCriteria = Array.isArray(acceptance) ? acceptance : (acceptance.criteria || []);
|
|
2072
|
-
const acceptanceVerification = acceptance.verification || [];
|
|
2073
|
-
|
|
2074
|
-
return `
|
|
2075
|
-
<div class="solution-task-card">
|
|
2076
|
-
<div class="solution-task-header" onclick="toggleTaskExpand(${index})">
|
|
2077
|
-
<div class="solution-task-info">
|
|
2078
|
-
<span class="solution-task-index">#${index + 1}</span>
|
|
2079
|
-
<span class="solution-task-id font-mono">${task.id || ''}</span>
|
|
2080
|
-
<span class="task-action-badge ${actionClass}">${task.action || 'Unknown'}</span>
|
|
2081
|
-
</div>
|
|
2082
|
-
<i data-lucide="chevron-down" class="w-4 h-4 task-expand-icon" id="taskExpandIcon${index}"></i>
|
|
2083
|
-
</div>
|
|
2084
|
-
<div class="solution-task-title">${task.title || task.description || 'No title'}</div>
|
|
2085
|
-
|
|
2086
|
-
<div class="solution-task-details hidden" id="taskDetails${index}">
|
|
2087
|
-
${task.scope ? `
|
|
2088
|
-
<div class="solution-task-scope">
|
|
2089
|
-
<span class="solution-task-scope-label">${t('issues.scope') || 'Scope'}:</span>
|
|
2090
|
-
<span class="font-mono text-sm">${task.scope}</span>
|
|
2091
|
-
</div>
|
|
2092
|
-
` : ''}
|
|
2093
|
-
|
|
2094
|
-
<!-- Phase 1: Implementation -->
|
|
2095
|
-
${implSteps.length > 0 ? `
|
|
2096
|
-
<div class="solution-task-section">
|
|
2097
|
-
<h5 class="solution-task-subtitle">
|
|
2098
|
-
<i data-lucide="code" class="w-3.5 h-3.5"></i>
|
|
2099
|
-
<span class="phase-badge phase-1">1</span>
|
|
2100
|
-
${t('issues.implementation') || 'Implementation'}
|
|
2101
|
-
</h5>
|
|
2102
|
-
<ol class="solution-impl-list">
|
|
2103
|
-
${implSteps.map(step => `<li>${typeof step === 'string' ? step : step.description || JSON.stringify(step)}</li>`).join('')}
|
|
2104
|
-
</ol>
|
|
2105
|
-
</div>
|
|
2106
|
-
` : ''}
|
|
2107
|
-
|
|
2108
|
-
${modPoints.length > 0 ? `
|
|
2109
|
-
<div class="solution-task-section">
|
|
2110
|
-
<h5 class="solution-task-subtitle">
|
|
2111
|
-
<i data-lucide="file-edit" class="w-3.5 h-3.5"></i>
|
|
2112
|
-
${t('issues.modificationPoints') || 'Modification Points'}
|
|
2113
|
-
</h5>
|
|
2114
|
-
<ul class="solution-task-list">
|
|
2115
|
-
${modPoints.map(mp => `
|
|
2116
|
-
<li class="solution-mod-point">
|
|
2117
|
-
<span class="mod-point-file font-mono">${mp.file || mp}</span>
|
|
2118
|
-
${mp.target ? `<span class="mod-point-target">→ ${mp.target}</span>` : ''}
|
|
2119
|
-
${mp.change ? `<span class="mod-point-change">${mp.change}</span>` : ''}
|
|
2120
|
-
</li>
|
|
2121
|
-
`).join('')}
|
|
2122
|
-
</ul>
|
|
2123
|
-
</div>
|
|
2124
|
-
` : ''}
|
|
2125
|
-
|
|
2126
|
-
<!-- Phase 2: Test -->
|
|
2127
|
-
${(testInfo.unit?.length > 0 || testInfo.commands?.length > 0) ? `
|
|
2128
|
-
<div class="solution-task-section">
|
|
2129
|
-
<h5 class="solution-task-subtitle">
|
|
2130
|
-
<i data-lucide="flask-conical" class="w-3.5 h-3.5"></i>
|
|
2131
|
-
<span class="phase-badge phase-2">2</span>
|
|
2132
|
-
${t('issues.test') || 'Test'}
|
|
2133
|
-
${testInfo.coverage_target ? `<span class="coverage-target">(${testInfo.coverage_target}% coverage)</span>` : ''}
|
|
2134
|
-
</h5>
|
|
2135
|
-
${testInfo.unit?.length > 0 ? `
|
|
2136
|
-
<div class="test-subsection">
|
|
2137
|
-
<span class="test-label">${t('issues.unitTests') || 'Unit Tests'}:</span>
|
|
2138
|
-
<ul class="test-list">
|
|
2139
|
-
${testInfo.unit.map(t => `<li>${t}</li>`).join('')}
|
|
2140
|
-
</ul>
|
|
2141
|
-
</div>
|
|
2142
|
-
` : ''}
|
|
2143
|
-
${testInfo.integration?.length > 0 ? `
|
|
2144
|
-
<div class="test-subsection">
|
|
2145
|
-
<span class="test-label">${t('issues.integrationTests') || 'Integration'}:</span>
|
|
2146
|
-
<ul class="test-list">
|
|
2147
|
-
${testInfo.integration.map(t => `<li>${t}</li>`).join('')}
|
|
2148
|
-
</ul>
|
|
2149
|
-
</div>
|
|
2150
|
-
` : ''}
|
|
2151
|
-
${testInfo.commands?.length > 0 ? `
|
|
2152
|
-
<div class="test-subsection">
|
|
2153
|
-
<span class="test-label">${t('issues.commands') || 'Commands'}:</span>
|
|
2154
|
-
<div class="test-commands">
|
|
2155
|
-
${testInfo.commands.map(cmd => `<code class="test-command">${cmd}</code>`).join('')}
|
|
2156
|
-
</div>
|
|
2157
|
-
</div>
|
|
2158
|
-
` : ''}
|
|
2159
|
-
</div>
|
|
2160
|
-
` : ''}
|
|
2161
|
-
|
|
2162
|
-
<!-- Phase 3: Regression -->
|
|
2163
|
-
${regression.length > 0 ? `
|
|
2164
|
-
<div class="solution-task-section">
|
|
2165
|
-
<h5 class="solution-task-subtitle">
|
|
2166
|
-
<i data-lucide="rotate-ccw" class="w-3.5 h-3.5"></i>
|
|
2167
|
-
<span class="phase-badge phase-3">3</span>
|
|
2168
|
-
${t('issues.regression') || 'Regression'}
|
|
2169
|
-
</h5>
|
|
2170
|
-
<div class="test-commands">
|
|
2171
|
-
${regression.map(cmd => `<code class="test-command">${cmd}</code>`).join('')}
|
|
2172
|
-
</div>
|
|
2173
|
-
</div>
|
|
2174
|
-
` : ''}
|
|
2175
|
-
|
|
2176
|
-
<!-- Phase 4: Acceptance -->
|
|
2177
|
-
${acceptanceCriteria.length > 0 ? `
|
|
2178
|
-
<div class="solution-task-section">
|
|
2179
|
-
<h5 class="solution-task-subtitle">
|
|
2180
|
-
<i data-lucide="check-circle" class="w-3.5 h-3.5"></i>
|
|
2181
|
-
<span class="phase-badge phase-4">4</span>
|
|
2182
|
-
${t('issues.acceptance') || 'Acceptance'}
|
|
2183
|
-
</h5>
|
|
2184
|
-
<div class="acceptance-subsection">
|
|
2185
|
-
<span class="acceptance-label">${t('issues.criteria') || 'Criteria'}:</span>
|
|
2186
|
-
<ul class="solution-acceptance-list">
|
|
2187
|
-
${acceptanceCriteria.map(ac => `<li>${typeof ac === 'string' ? ac : ac.description || JSON.stringify(ac)}</li>`).join('')}
|
|
2188
|
-
</ul>
|
|
2189
|
-
</div>
|
|
2190
|
-
${acceptanceVerification.length > 0 ? `
|
|
2191
|
-
<div class="acceptance-subsection">
|
|
2192
|
-
<span class="acceptance-label">${t('issues.verification') || 'Verification'}:</span>
|
|
2193
|
-
<div class="verification-commands">
|
|
2194
|
-
${acceptanceVerification.map(v => `<code class="verification-command">${v}</code>`).join('')}
|
|
2195
|
-
</div>
|
|
2196
|
-
</div>
|
|
2197
|
-
` : ''}
|
|
2198
|
-
</div>
|
|
2199
|
-
` : ''}
|
|
2200
|
-
|
|
2201
|
-
<!-- Phase 5: Commit -->
|
|
2202
|
-
${commitInfo.type ? `
|
|
2203
|
-
<div class="solution-task-section">
|
|
2204
|
-
<h5 class="solution-task-subtitle">
|
|
2205
|
-
<i data-lucide="git-commit" class="w-3.5 h-3.5"></i>
|
|
2206
|
-
<span class="phase-badge phase-5">5</span>
|
|
2207
|
-
${t('issues.commit') || 'Commit'}
|
|
2208
|
-
</h5>
|
|
2209
|
-
<div class="commit-info">
|
|
2210
|
-
<div class="commit-type">
|
|
2211
|
-
<span class="commit-type-badge ${commitInfo.type}">${commitInfo.type}</span>
|
|
2212
|
-
<span class="commit-scope">(${commitInfo.scope || 'core'})</span>
|
|
2213
|
-
${commitInfo.breaking ? '<span class="commit-breaking">BREAKING</span>' : ''}
|
|
2214
|
-
</div>
|
|
2215
|
-
${commitInfo.message_template ? `
|
|
2216
|
-
<pre class="commit-message">${commitInfo.message_template}</pre>
|
|
2217
|
-
` : ''}
|
|
2218
|
-
</div>
|
|
2219
|
-
</div>
|
|
2220
|
-
` : ''}
|
|
2221
|
-
|
|
2222
|
-
<!-- Dependencies -->
|
|
2223
|
-
${dependsOn.length > 0 ? `
|
|
2224
|
-
<div class="solution-task-section">
|
|
2225
|
-
<h5 class="solution-task-subtitle">
|
|
2226
|
-
<i data-lucide="git-branch" class="w-3.5 h-3.5"></i>
|
|
2227
|
-
${t('issues.dependencies') || 'Dependencies'}
|
|
2228
|
-
</h5>
|
|
2229
|
-
<div class="solution-deps-list">
|
|
2230
|
-
${dependsOn.map(dep => `<span class="solution-dep-tag font-mono">${dep}</span>`).join('')}
|
|
2231
|
-
</div>
|
|
2232
|
-
</div>
|
|
2233
|
-
` : ''}
|
|
2234
|
-
</div>
|
|
2235
|
-
</div>
|
|
2236
|
-
`;
|
|
2237
|
-
}
|
|
2238
|
-
|
|
2239
|
-
function toggleTaskExpand(index) {
|
|
2240
|
-
const details = document.getElementById('taskDetails' + index);
|
|
2241
|
-
const icon = document.getElementById('taskExpandIcon' + index);
|
|
2242
|
-
if (details) {
|
|
2243
|
-
details.classList.toggle('hidden');
|
|
2244
|
-
}
|
|
2245
|
-
if (icon) {
|
|
2246
|
-
icon.style.transform = details?.classList.contains('hidden') ? '' : 'rotate(180deg)';
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
function toggleSolutionJson() {
|
|
2251
|
-
const content = document.getElementById('solutionJsonContent');
|
|
2252
|
-
if (content) {
|
|
2253
|
-
content.classList.toggle('hidden');
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
async function toggleSolutionBind() {
|
|
2258
|
-
const solution = issueData.selectedSolution;
|
|
2259
|
-
const issueId = issueData.selectedSolutionIssueId;
|
|
2260
|
-
if (!solution || !issueId) return;
|
|
2261
|
-
|
|
2262
|
-
const action = solution.is_bound ? 'unbind' : 'bind';
|
|
2263
|
-
|
|
2264
|
-
try {
|
|
2265
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
2266
|
-
method: 'PATCH',
|
|
2267
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2268
|
-
body: JSON.stringify({
|
|
2269
|
-
bound_solution_id: action === 'bind' ? solution.id : null
|
|
2270
|
-
})
|
|
2271
|
-
});
|
|
2272
|
-
|
|
2273
|
-
if (!response.ok) throw new Error('Failed to ' + action);
|
|
2274
|
-
|
|
2275
|
-
showNotification(action === 'bind' ? (t('issues.solutionBound') || 'Solution bound') : (t('issues.solutionUnbound') || 'Solution unbound'), 'success');
|
|
2276
|
-
|
|
2277
|
-
// Refresh data
|
|
2278
|
-
await loadIssueData();
|
|
2279
|
-
const detail = await loadIssueDetail(issueId);
|
|
2280
|
-
if (detail) {
|
|
2281
|
-
issueData.selectedIssue = detail;
|
|
2282
|
-
// Update solution reference
|
|
2283
|
-
const updatedSolution = detail.solutions?.find(s => s.id === solution.id);
|
|
2284
|
-
if (updatedSolution) {
|
|
2285
|
-
issueData.selectedSolution = updatedSolution;
|
|
2286
|
-
renderSolutionDetail(updatedSolution);
|
|
2287
|
-
}
|
|
2288
|
-
renderIssueDetailPanel(detail);
|
|
2289
|
-
}
|
|
2290
|
-
} catch (err) {
|
|
2291
|
-
console.error('Failed to ' + action + ' solution:', err);
|
|
2292
|
-
showNotification('Failed to ' + action + ' solution', 'error');
|
|
2293
|
-
}
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
// Helper: escape HTML
|
|
2297
|
-
function escapeHtml(text) {
|
|
2298
|
-
if (!text) return '';
|
|
2299
|
-
const div = document.createElement('div');
|
|
2300
|
-
div.textContent = text;
|
|
2301
|
-
return div.innerHTML;
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
// Helper: escape regex special characters
|
|
2305
|
-
function escapeRegex(str) {
|
|
2306
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
// Helper: highlight matching text in search results
|
|
2310
|
-
function highlightMatch(text, query) {
|
|
2311
|
-
if (!text || !query) return escapeHtml(text || '');
|
|
2312
|
-
const escaped = escapeHtml(text);
|
|
2313
|
-
const escapedQuery = escapeRegex(escapeHtml(query));
|
|
2314
|
-
const regex = new RegExp(`(${escapedQuery})`, 'gi');
|
|
2315
|
-
return escaped.replace(regex, '<mark class="search-highlight">$1</mark>');
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
function openQueueItemDetail(itemId) {
|
|
2319
|
-
// Support both solution-level and task-level queues
|
|
2320
|
-
const items = issueData.queue.solutions || issueData.queue.tasks || [];
|
|
2321
|
-
const item = items.find(q => q.item_id === itemId);
|
|
2322
|
-
if (item) {
|
|
2323
|
-
openIssueDetail(item.issue_id);
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
// ========== Edit Functions ==========
|
|
2328
|
-
function startEditField(issueId, field, currentValue) {
|
|
2329
|
-
const container = document.getElementById('issueTitle');
|
|
2330
|
-
if (!container) return;
|
|
2331
|
-
|
|
2332
|
-
container.innerHTML = `
|
|
2333
|
-
<input type="text" class="edit-input" id="editField" value="${currentValue}" />
|
|
2334
|
-
<div class="edit-actions">
|
|
2335
|
-
<button class="btn-save" onclick="saveFieldEdit('${issueId}', '${field}')">
|
|
2336
|
-
<i data-lucide="check" class="w-4 h-4"></i>
|
|
2337
|
-
</button>
|
|
2338
|
-
<button class="btn-cancel" onclick="cancelEdit()">
|
|
2339
|
-
<i data-lucide="x" class="w-4 h-4"></i>
|
|
2340
|
-
</button>
|
|
2341
|
-
</div>
|
|
2342
|
-
`;
|
|
2343
|
-
lucide.createIcons();
|
|
2344
|
-
document.getElementById('editField')?.focus();
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
function startEditContext(issueId) {
|
|
2348
|
-
const container = document.getElementById('issueContext');
|
|
2349
|
-
const currentValue = issueData.selectedIssue?.context || '';
|
|
2350
|
-
if (!container) return;
|
|
2351
|
-
|
|
2352
|
-
container.innerHTML = `
|
|
2353
|
-
<textarea class="edit-textarea" id="editContext" rows="8">${currentValue}</textarea>
|
|
2354
|
-
<div class="edit-actions">
|
|
2355
|
-
<button class="btn-save" onclick="saveContextEdit('${issueId}')">
|
|
2356
|
-
<i data-lucide="check" class="w-4 h-4"></i>
|
|
2357
|
-
</button>
|
|
2358
|
-
<button class="btn-cancel" onclick="cancelEdit()">
|
|
2359
|
-
<i data-lucide="x" class="w-4 h-4"></i>
|
|
2360
|
-
</button>
|
|
2361
|
-
</div>
|
|
2362
|
-
`;
|
|
2363
|
-
lucide.createIcons();
|
|
2364
|
-
document.getElementById('editContext')?.focus();
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
async function saveFieldEdit(issueId, field) {
|
|
2368
|
-
const input = document.getElementById('editField');
|
|
2369
|
-
if (!input) return;
|
|
2370
|
-
|
|
2371
|
-
const value = input.value.trim();
|
|
2372
|
-
if (!value) return;
|
|
2373
|
-
|
|
2374
|
-
try {
|
|
2375
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
2376
|
-
method: 'PATCH',
|
|
2377
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2378
|
-
body: JSON.stringify({ [field]: value })
|
|
2379
|
-
});
|
|
2380
|
-
|
|
2381
|
-
if (!response.ok) throw new Error('Failed to update');
|
|
2382
|
-
|
|
2383
|
-
showNotification('Updated ' + field, 'success');
|
|
2384
|
-
|
|
2385
|
-
// Refresh data
|
|
2386
|
-
await loadIssueData();
|
|
2387
|
-
const detail = await loadIssueDetail(issueId);
|
|
2388
|
-
if (detail) {
|
|
2389
|
-
issueData.selectedIssue = detail;
|
|
2390
|
-
renderIssueDetailPanel(detail);
|
|
2391
|
-
}
|
|
2392
|
-
} catch (err) {
|
|
2393
|
-
showNotification('Failed to update', 'error');
|
|
2394
|
-
cancelEdit();
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
async function saveContextEdit(issueId) {
|
|
2399
|
-
const textarea = document.getElementById('editContext');
|
|
2400
|
-
if (!textarea) return;
|
|
2401
|
-
|
|
2402
|
-
const value = textarea.value;
|
|
2403
|
-
|
|
2404
|
-
try {
|
|
2405
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
2406
|
-
method: 'PATCH',
|
|
2407
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2408
|
-
body: JSON.stringify({ context: value })
|
|
2409
|
-
});
|
|
2410
|
-
|
|
2411
|
-
if (!response.ok) throw new Error('Failed to update');
|
|
2412
|
-
|
|
2413
|
-
showNotification('Context updated', 'success');
|
|
2414
|
-
|
|
2415
|
-
// Refresh detail
|
|
2416
|
-
const detail = await loadIssueDetail(issueId);
|
|
2417
|
-
if (detail) {
|
|
2418
|
-
issueData.selectedIssue = detail;
|
|
2419
|
-
renderIssueDetailPanel(detail);
|
|
2420
|
-
}
|
|
2421
|
-
} catch (err) {
|
|
2422
|
-
showNotification('Failed to update context', 'error');
|
|
2423
|
-
cancelEdit();
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
|
|
2427
|
-
function cancelEdit() {
|
|
2428
|
-
if (issueData.selectedIssue) {
|
|
2429
|
-
renderIssueDetailPanel(issueData.selectedIssue);
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
async function updateTaskStatus(issueId, taskId, status) {
|
|
2434
|
-
try {
|
|
2435
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '/tasks/' + encodeURIComponent(taskId) + '?path=' + encodeURIComponent(projectPath), {
|
|
2436
|
-
method: 'PATCH',
|
|
2437
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2438
|
-
body: JSON.stringify({ status })
|
|
2439
|
-
});
|
|
2440
|
-
|
|
2441
|
-
if (!response.ok) throw new Error('Failed to update task');
|
|
2442
|
-
|
|
2443
|
-
showNotification('Task status updated', 'success');
|
|
2444
|
-
} catch (err) {
|
|
2445
|
-
showNotification('Failed to update task status', 'error');
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
// ========== Search Functions ==========
|
|
2450
|
-
var searchDebounceTimer = null;
|
|
2451
|
-
|
|
2452
|
-
function handleIssueSearch(value) {
|
|
2453
|
-
issueData.searchQuery = value;
|
|
2454
|
-
|
|
2455
|
-
// Update suggestions immediately (no debounce for dropdown)
|
|
2456
|
-
updateSearchSuggestions(value);
|
|
2457
|
-
issueData.showSuggestions = value.length > 0;
|
|
2458
|
-
issueData.selectedSuggestion = -1;
|
|
2459
|
-
updateSuggestionsDropdown();
|
|
2460
|
-
|
|
2461
|
-
// Clear previous timer
|
|
2462
|
-
if (searchDebounceTimer) {
|
|
2463
|
-
clearTimeout(searchDebounceTimer);
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
// 300ms debounce for full re-render to prevent freeze on rapid input
|
|
2467
|
-
searchDebounceTimer = setTimeout(() => {
|
|
2468
|
-
renderIssueView();
|
|
2469
|
-
// Restore input focus and cursor position
|
|
2470
|
-
const input = document.getElementById('issueSearchInput');
|
|
2471
|
-
if (input) {
|
|
2472
|
-
input.focus();
|
|
2473
|
-
input.setSelectionRange(value.length, value.length);
|
|
2474
|
-
}
|
|
2475
|
-
}, 300);
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
function clearIssueSearch() {
|
|
2479
|
-
if (searchDebounceTimer) {
|
|
2480
|
-
clearTimeout(searchDebounceTimer);
|
|
2481
|
-
}
|
|
2482
|
-
issueData.searchQuery = '';
|
|
2483
|
-
issueData.showSuggestions = false;
|
|
2484
|
-
issueData.searchSuggestions = [];
|
|
2485
|
-
issueData.selectedSuggestion = -1;
|
|
2486
|
-
renderIssueView();
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
// Update search suggestions based on query
|
|
2490
|
-
function updateSearchSuggestions(query) {
|
|
2491
|
-
if (!query || query.length < 1) {
|
|
2492
|
-
issueData.searchSuggestions = [];
|
|
2493
|
-
return;
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
|
-
const q = query.toLowerCase();
|
|
2497
|
-
const allIssues = [...issueData.issues, ...issueData.historyIssues];
|
|
2498
|
-
|
|
2499
|
-
// Find matching issues (max 6)
|
|
2500
|
-
issueData.searchSuggestions = allIssues
|
|
2501
|
-
.filter(issue => {
|
|
2502
|
-
const idMatch = issue.id.toLowerCase().includes(q);
|
|
2503
|
-
const titleMatch = issue.title && issue.title.toLowerCase().includes(q);
|
|
2504
|
-
const contextMatch = issue.context && issue.context.toLowerCase().includes(q);
|
|
2505
|
-
const solutionMatch = issue.solutions && issue.solutions.some(sol =>
|
|
2506
|
-
(sol.description && sol.description.toLowerCase().includes(q)) ||
|
|
2507
|
-
(sol.approach && sol.approach.toLowerCase().includes(q))
|
|
2508
|
-
);
|
|
2509
|
-
return idMatch || titleMatch || contextMatch || solutionMatch;
|
|
2510
|
-
})
|
|
2511
|
-
.slice(0, 6);
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
|
-
// Render search suggestions dropdown
|
|
2515
|
-
function renderSearchSuggestions() {
|
|
2516
|
-
if (!issueData.searchSuggestions || issueData.searchSuggestions.length === 0) {
|
|
2517
|
-
return '';
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
return issueData.searchSuggestions.map((issue, index) => `
|
|
2521
|
-
<div class="search-suggestion-item ${index === issueData.selectedSuggestion ? 'selected' : ''}"
|
|
2522
|
-
onclick="selectSuggestion(${index})"
|
|
2523
|
-
onmouseenter="issueData.selectedSuggestion = ${index}">
|
|
2524
|
-
<div class="suggestion-id">${highlightMatch(issue.id, issueData.searchQuery)}</div>
|
|
2525
|
-
<div class="suggestion-title">${highlightMatch(issue.title || issue.id, issueData.searchQuery)}</div>
|
|
2526
|
-
</div>
|
|
2527
|
-
`).join('');
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
// Show search suggestions
|
|
2531
|
-
function showSearchSuggestions() {
|
|
2532
|
-
if (issueData.searchQuery) {
|
|
2533
|
-
updateSearchSuggestions(issueData.searchQuery);
|
|
2534
|
-
issueData.showSuggestions = true;
|
|
2535
|
-
updateSuggestionsDropdown();
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
// Hide search suggestions
|
|
2540
|
-
function hideSearchSuggestions() {
|
|
2541
|
-
issueData.showSuggestions = false;
|
|
2542
|
-
issueData.selectedSuggestion = -1;
|
|
2543
|
-
const dropdown = document.getElementById('searchSuggestions');
|
|
2544
|
-
if (dropdown) {
|
|
2545
|
-
dropdown.classList.remove('show');
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
// Update suggestions dropdown without full re-render
|
|
2550
|
-
function updateSuggestionsDropdown() {
|
|
2551
|
-
const dropdown = document.getElementById('searchSuggestions');
|
|
2552
|
-
if (dropdown) {
|
|
2553
|
-
dropdown.innerHTML = renderSearchSuggestions();
|
|
2554
|
-
if (issueData.showSuggestions && issueData.searchSuggestions.length > 0) {
|
|
2555
|
-
dropdown.classList.add('show');
|
|
2556
|
-
} else {
|
|
2557
|
-
dropdown.classList.remove('show');
|
|
2558
|
-
}
|
|
2559
|
-
}
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
// Select a suggestion
|
|
2563
|
-
function selectSuggestion(index) {
|
|
2564
|
-
const issue = issueData.searchSuggestions[index];
|
|
2565
|
-
if (issue) {
|
|
2566
|
-
hideSearchSuggestions();
|
|
2567
|
-
openIssueDetail(issue.id, issue._isArchived);
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
// Handle keyboard navigation in search
|
|
2572
|
-
function handleSearchKeydown(event) {
|
|
2573
|
-
const suggestions = issueData.searchSuggestions || [];
|
|
2574
|
-
|
|
2575
|
-
if (!issueData.showSuggestions || suggestions.length === 0) {
|
|
2576
|
-
// If Enter and no suggestions, just search
|
|
2577
|
-
if (event.key === 'Enter') {
|
|
2578
|
-
hideSearchSuggestions();
|
|
2579
|
-
}
|
|
2580
|
-
return;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
switch (event.key) {
|
|
2584
|
-
case 'ArrowDown':
|
|
2585
|
-
event.preventDefault();
|
|
2586
|
-
issueData.selectedSuggestion = Math.min(
|
|
2587
|
-
issueData.selectedSuggestion + 1,
|
|
2588
|
-
suggestions.length - 1
|
|
2589
|
-
);
|
|
2590
|
-
updateSuggestionsDropdown();
|
|
2591
|
-
break;
|
|
2592
|
-
|
|
2593
|
-
case 'ArrowUp':
|
|
2594
|
-
event.preventDefault();
|
|
2595
|
-
issueData.selectedSuggestion = Math.max(issueData.selectedSuggestion - 1, -1);
|
|
2596
|
-
updateSuggestionsDropdown();
|
|
2597
|
-
break;
|
|
2598
|
-
|
|
2599
|
-
case 'Enter':
|
|
2600
|
-
event.preventDefault();
|
|
2601
|
-
if (issueData.selectedSuggestion >= 0) {
|
|
2602
|
-
selectSuggestion(issueData.selectedSuggestion);
|
|
2603
|
-
} else {
|
|
2604
|
-
hideSearchSuggestions();
|
|
2605
|
-
}
|
|
2606
|
-
break;
|
|
2607
|
-
|
|
2608
|
-
case 'Escape':
|
|
2609
|
-
hideSearchSuggestions();
|
|
2610
|
-
break;
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
// Close suggestions when clicking outside
|
|
2615
|
-
document.addEventListener('click', function(event) {
|
|
2616
|
-
const searchContainer = document.querySelector('.issue-search');
|
|
2617
|
-
if (searchContainer && !searchContainer.contains(event.target)) {
|
|
2618
|
-
hideSearchSuggestions();
|
|
2619
|
-
}
|
|
2620
|
-
});
|
|
2621
|
-
|
|
2622
|
-
// ========== Create Issue Modal ==========
|
|
2623
|
-
function generateIssueId() {
|
|
2624
|
-
// Generate unique ID: ISSUE-YYYYMMDD-XXX format
|
|
2625
|
-
const now = new Date();
|
|
2626
|
-
const dateStr = now.getFullYear().toString() +
|
|
2627
|
-
String(now.getMonth() + 1).padStart(2, '0') +
|
|
2628
|
-
String(now.getDate()).padStart(2, '0');
|
|
2629
|
-
|
|
2630
|
-
// Find existing IDs with same date prefix
|
|
2631
|
-
const prefix = 'ISSUE-' + dateStr + '-';
|
|
2632
|
-
const existingIds = (issueData.issues || [])
|
|
2633
|
-
.map(i => i.id)
|
|
2634
|
-
.filter(id => id.startsWith(prefix));
|
|
2635
|
-
|
|
2636
|
-
// Get next sequence number
|
|
2637
|
-
let maxSeq = 0;
|
|
2638
|
-
existingIds.forEach(id => {
|
|
2639
|
-
const seqStr = id.replace(prefix, '');
|
|
2640
|
-
const seq = parseInt(seqStr, 10);
|
|
2641
|
-
if (!isNaN(seq) && seq > maxSeq) {
|
|
2642
|
-
maxSeq = seq;
|
|
2643
|
-
}
|
|
2644
|
-
});
|
|
2645
|
-
|
|
2646
|
-
return prefix + String(maxSeq + 1).padStart(3, '0');
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
function showCreateIssueModal() {
|
|
2650
|
-
const modal = document.getElementById('createIssueModal');
|
|
2651
|
-
if (modal) {
|
|
2652
|
-
modal.classList.remove('hidden');
|
|
2653
|
-
|
|
2654
|
-
// Auto-generate issue ID
|
|
2655
|
-
const idInput = document.getElementById('newIssueId');
|
|
2656
|
-
if (idInput) {
|
|
2657
|
-
idInput.value = generateIssueId();
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
lucide.createIcons();
|
|
2661
|
-
// Focus on title input instead of ID
|
|
2662
|
-
setTimeout(() => {
|
|
2663
|
-
document.getElementById('newIssueTitle')?.focus();
|
|
2664
|
-
}, 100);
|
|
2665
|
-
}
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
function regenerateIssueId() {
|
|
2669
|
-
const idInput = document.getElementById('newIssueId');
|
|
2670
|
-
if (idInput) {
|
|
2671
|
-
idInput.value = generateIssueId();
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
function hideCreateIssueModal() {
|
|
2676
|
-
const modal = document.getElementById('createIssueModal');
|
|
2677
|
-
if (modal) {
|
|
2678
|
-
modal.classList.add('hidden');
|
|
2679
|
-
// Clear form
|
|
2680
|
-
const idInput = document.getElementById('newIssueId');
|
|
2681
|
-
const titleInput = document.getElementById('newIssueTitle');
|
|
2682
|
-
const contextInput = document.getElementById('newIssueContext');
|
|
2683
|
-
const prioritySelect = document.getElementById('newIssuePriority');
|
|
2684
|
-
if (idInput) idInput.value = '';
|
|
2685
|
-
if (titleInput) titleInput.value = '';
|
|
2686
|
-
if (contextInput) contextInput.value = '';
|
|
2687
|
-
if (prioritySelect) prioritySelect.value = '3';
|
|
2688
|
-
}
|
|
2689
|
-
}
|
|
2690
|
-
|
|
2691
|
-
// ========== Pull Issues Modal ==========
|
|
2692
|
-
function showPullIssuesModal() {
|
|
2693
|
-
const modal = document.getElementById('pullIssuesModal');
|
|
2694
|
-
if (modal) {
|
|
2695
|
-
modal.classList.remove('hidden');
|
|
2696
|
-
// Reset result area
|
|
2697
|
-
const resultDiv = document.getElementById('pullIssueResult');
|
|
2698
|
-
if (resultDiv) {
|
|
2699
|
-
resultDiv.classList.add('hidden');
|
|
2700
|
-
resultDiv.innerHTML = '';
|
|
2701
|
-
}
|
|
2702
|
-
lucide.createIcons();
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
function hidePullIssuesModal() {
|
|
2707
|
-
const modal = document.getElementById('pullIssuesModal');
|
|
2708
|
-
if (modal) {
|
|
2709
|
-
modal.classList.add('hidden');
|
|
2710
|
-
// Clear form
|
|
2711
|
-
const stateSelect = document.getElementById('pullIssueState');
|
|
2712
|
-
const limitInput = document.getElementById('pullIssueLimit');
|
|
2713
|
-
const labelsInput = document.getElementById('pullIssueLabels');
|
|
2714
|
-
const downloadImagesCheck = document.getElementById('pullDownloadImages');
|
|
2715
|
-
if (stateSelect) stateSelect.value = 'open';
|
|
2716
|
-
if (limitInput) limitInput.value = '20';
|
|
2717
|
-
if (labelsInput) labelsInput.value = '';
|
|
2718
|
-
if (downloadImagesCheck) downloadImagesCheck.checked = true;
|
|
2719
|
-
}
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
async function pullGitHubIssues() {
|
|
2723
|
-
const stateSelect = document.getElementById('pullIssueState');
|
|
2724
|
-
const limitInput = document.getElementById('pullIssueLimit');
|
|
2725
|
-
const labelsInput = document.getElementById('pullIssueLabels');
|
|
2726
|
-
const downloadImagesCheck = document.getElementById('pullDownloadImages');
|
|
2727
|
-
const resultDiv = document.getElementById('pullIssueResult');
|
|
2728
|
-
const pullBtn = document.getElementById('pullIssuesBtn');
|
|
2729
|
-
|
|
2730
|
-
const state = stateSelect?.value || 'open';
|
|
2731
|
-
const limit = parseInt(limitInput?.value || '20');
|
|
2732
|
-
const labels = labelsInput?.value?.trim();
|
|
2733
|
-
const downloadImages = downloadImagesCheck?.checked || false;
|
|
2734
|
-
|
|
2735
|
-
// Disable button and show loading
|
|
2736
|
-
if (pullBtn) {
|
|
2737
|
-
pullBtn.disabled = true;
|
|
2738
|
-
pullBtn.innerHTML = '<i data-lucide="loader-2" class="w-4 h-4 mr-1 animate-spin"></i>' + (t('common.loading') || 'Loading...');
|
|
2739
|
-
lucide.createIcons();
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
try {
|
|
2743
|
-
const params = new URLSearchParams({
|
|
2744
|
-
path: projectPath,
|
|
2745
|
-
state: state,
|
|
2746
|
-
limit: limit.toString(),
|
|
2747
|
-
downloadImages: downloadImages.toString()
|
|
2748
|
-
});
|
|
2749
|
-
if (labels) params.set('labels', labels);
|
|
2750
|
-
|
|
2751
|
-
const response = await fetch('/api/issues/pull?' + params.toString(), {
|
|
2752
|
-
method: 'POST'
|
|
2753
|
-
});
|
|
2754
|
-
|
|
2755
|
-
const result = await response.json();
|
|
2756
|
-
|
|
2757
|
-
if (!response.ok || result.error) {
|
|
2758
|
-
showNotification(result.error || 'Failed to pull issues', 'error');
|
|
2759
|
-
if (resultDiv) {
|
|
2760
|
-
resultDiv.classList.remove('hidden');
|
|
2761
|
-
resultDiv.innerHTML = `<p class="text-destructive">${result.error || 'Failed to pull issues'}</p>`;
|
|
2762
|
-
}
|
|
2763
|
-
return;
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
// Show results
|
|
2767
|
-
if (resultDiv) {
|
|
2768
|
-
resultDiv.classList.remove('hidden');
|
|
2769
|
-
resultDiv.innerHTML = `
|
|
2770
|
-
<div class="flex items-start gap-2">
|
|
2771
|
-
<i data-lucide="check-circle" class="w-5 h-5 text-success mt-0.5"></i>
|
|
2772
|
-
<div class="flex-1">
|
|
2773
|
-
<p class="font-medium mb-2">${t('issues.pullSuccess') || 'GitHub Issues Pulled Successfully'}</p>
|
|
2774
|
-
<div class="text-sm text-muted-foreground space-y-1">
|
|
2775
|
-
<p>✓ Imported: <strong>${result.imported || 0}</strong> new issues</p>
|
|
2776
|
-
<p>✓ Updated: <strong>${result.updated || 0}</strong> existing issues</p>
|
|
2777
|
-
<p>✓ Skipped: <strong>${result.skipped || 0}</strong> unchanged issues</p>
|
|
2778
|
-
${result.images_downloaded > 0 ? `<p>✓ Downloaded: <strong>${result.images_downloaded}</strong> images</p>` : ''}
|
|
2779
|
-
</div>
|
|
2780
|
-
</div>
|
|
2781
|
-
</div>
|
|
2782
|
-
`;
|
|
2783
|
-
lucide.createIcons();
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
showNotification(`Pulled ${result.imported + result.updated} issues from GitHub`, 'success');
|
|
2787
|
-
|
|
2788
|
-
// Reload data after 1 second
|
|
2789
|
-
setTimeout(async () => {
|
|
2790
|
-
await loadIssueData();
|
|
2791
|
-
renderIssueView();
|
|
2792
|
-
hidePullIssuesModal();
|
|
2793
|
-
}, 1500);
|
|
2794
|
-
|
|
2795
|
-
} catch (err) {
|
|
2796
|
-
console.error('Failed to pull issues:', err);
|
|
2797
|
-
showNotification('Failed to pull issues', 'error');
|
|
2798
|
-
if (resultDiv) {
|
|
2799
|
-
resultDiv.classList.remove('hidden');
|
|
2800
|
-
resultDiv.innerHTML = `<p class="text-destructive">${err.message || 'Unknown error occurred'}</p>`;
|
|
2801
|
-
}
|
|
2802
|
-
} finally {
|
|
2803
|
-
// Re-enable button
|
|
2804
|
-
if (pullBtn) {
|
|
2805
|
-
pullBtn.disabled = false;
|
|
2806
|
-
pullBtn.innerHTML = '<i data-lucide="download" class="w-4 h-4 mr-1"></i>' + (t('issues.pull') || 'Pull');
|
|
2807
|
-
lucide.createIcons();
|
|
2808
|
-
}
|
|
2809
|
-
}
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
async function createIssue() {
|
|
2813
|
-
const idInput = document.getElementById('newIssueId');
|
|
2814
|
-
const titleInput = document.getElementById('newIssueTitle');
|
|
2815
|
-
const contextInput = document.getElementById('newIssueContext');
|
|
2816
|
-
const prioritySelect = document.getElementById('newIssuePriority');
|
|
2817
|
-
|
|
2818
|
-
const issueId = idInput?.value?.trim();
|
|
2819
|
-
const title = titleInput?.value?.trim();
|
|
2820
|
-
const context = contextInput?.value?.trim();
|
|
2821
|
-
const priority = parseInt(prioritySelect?.value || '3');
|
|
2822
|
-
|
|
2823
|
-
if (!issueId) {
|
|
2824
|
-
showNotification(t('issues.idRequired') || 'Issue ID is required', 'error');
|
|
2825
|
-
idInput?.focus();
|
|
2826
|
-
return;
|
|
2827
|
-
}
|
|
2828
|
-
|
|
2829
|
-
if (!title) {
|
|
2830
|
-
showNotification(t('issues.titleRequired') || 'Title is required', 'error');
|
|
2831
|
-
titleInput?.focus();
|
|
2832
|
-
return;
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
try {
|
|
2836
|
-
const response = await fetch('/api/issues?path=' + encodeURIComponent(projectPath), {
|
|
2837
|
-
method: 'POST',
|
|
2838
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2839
|
-
body: JSON.stringify({
|
|
2840
|
-
id: issueId,
|
|
2841
|
-
title: title,
|
|
2842
|
-
context: context,
|
|
2843
|
-
priority: priority,
|
|
2844
|
-
source: 'dashboard'
|
|
2845
|
-
})
|
|
2846
|
-
});
|
|
2847
|
-
|
|
2848
|
-
const result = await response.json();
|
|
2849
|
-
|
|
2850
|
-
if (!response.ok || result.error) {
|
|
2851
|
-
showNotification(result.error || 'Failed to create issue', 'error');
|
|
2852
|
-
return;
|
|
2853
|
-
}
|
|
2854
|
-
|
|
2855
|
-
showNotification(t('issues.created') || 'Issue created successfully', 'success');
|
|
2856
|
-
hideCreateIssueModal();
|
|
2857
|
-
|
|
2858
|
-
// Reload data and refresh view
|
|
2859
|
-
await loadIssueData();
|
|
2860
|
-
renderIssueView();
|
|
2861
|
-
} catch (err) {
|
|
2862
|
-
console.error('Failed to create issue:', err);
|
|
2863
|
-
showNotification('Failed to create issue', 'error');
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
|
-
// ========== Delete Issue ==========
|
|
2868
|
-
async function deleteIssue(issueId) {
|
|
2869
|
-
if (!confirm(t('issues.confirmDelete') || 'Are you sure you want to delete this issue?')) {
|
|
2870
|
-
return;
|
|
2871
|
-
}
|
|
2872
|
-
|
|
2873
|
-
try {
|
|
2874
|
-
const response = await fetch('/api/issues/' + encodeURIComponent(issueId) + '?path=' + encodeURIComponent(projectPath), {
|
|
2875
|
-
method: 'DELETE'
|
|
2876
|
-
});
|
|
2877
|
-
|
|
2878
|
-
if (!response.ok) throw new Error('Failed to delete');
|
|
2879
|
-
|
|
2880
|
-
showNotification(t('issues.deleted') || 'Issue deleted', 'success');
|
|
2881
|
-
closeIssueDetail();
|
|
2882
|
-
|
|
2883
|
-
// Reload data and refresh view
|
|
2884
|
-
await loadIssueData();
|
|
2885
|
-
renderIssueView();
|
|
2886
|
-
} catch (err) {
|
|
2887
|
-
showNotification('Failed to delete issue', 'error');
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
// ========== Queue Operations ==========
|
|
2892
|
-
async function refreshQueue() {
|
|
2893
|
-
try {
|
|
2894
|
-
await loadQueueData();
|
|
2895
|
-
renderIssueView();
|
|
2896
|
-
showNotification(t('issues.queueRefreshed') || 'Queue refreshed', 'success');
|
|
2897
|
-
} catch (err) {
|
|
2898
|
-
showNotification('Failed to refresh queue', 'error');
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
|
|
2902
|
-
function createExecutionQueue() {
|
|
2903
|
-
showQueueCommandModal();
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
function showQueueCommandModal() {
|
|
2907
|
-
// Create modal if not exists
|
|
2908
|
-
let modal = document.getElementById('queueCommandModal');
|
|
2909
|
-
if (!modal) {
|
|
2910
|
-
modal = document.createElement('div');
|
|
2911
|
-
modal.id = 'queueCommandModal';
|
|
2912
|
-
modal.className = 'issue-modal';
|
|
2913
|
-
document.body.appendChild(modal);
|
|
2914
|
-
}
|
|
2915
|
-
|
|
2916
|
-
const command = 'claude /issue:queue';
|
|
2917
|
-
const altCommand = 'ccw issue queue';
|
|
2918
|
-
|
|
2919
|
-
modal.innerHTML = `
|
|
2920
|
-
<div class="issue-modal-backdrop" onclick="hideQueueCommandModal()"></div>
|
|
2921
|
-
<div class="issue-modal-content" style="max-width: 560px;">
|
|
2922
|
-
<div class="issue-modal-header">
|
|
2923
|
-
<h3>${t('issues.createQueue') || 'Create Execution Queue'}</h3>
|
|
2924
|
-
<button class="btn-icon" onclick="hideQueueCommandModal()">
|
|
2925
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
2926
|
-
</button>
|
|
2927
|
-
</div>
|
|
2928
|
-
<div class="issue-modal-body">
|
|
2929
|
-
<p class="text-sm text-muted-foreground mb-4">
|
|
2930
|
-
${t('issues.queueCommandHint') || 'Run one of the following commands in your terminal to generate the execution queue from bound solutions:'}
|
|
2931
|
-
</p>
|
|
2932
|
-
|
|
2933
|
-
<div class="command-option mb-3">
|
|
2934
|
-
<label class="text-xs font-medium text-muted-foreground mb-1 block">
|
|
2935
|
-
<i data-lucide="terminal" class="w-3 h-3 inline mr-1"></i>
|
|
2936
|
-
Claude Code CLI
|
|
2937
|
-
</label>
|
|
2938
|
-
<div class="command-box">
|
|
2939
|
-
<code class="command-text">${command}</code>
|
|
2940
|
-
<button class="btn-icon" onclick="copyCommand('${command}')" title="${t('common.copy') || 'Copy'}">
|
|
2941
|
-
<i data-lucide="copy" class="w-4 h-4"></i>
|
|
2942
|
-
</button>
|
|
2943
|
-
</div>
|
|
2944
|
-
</div>
|
|
2945
|
-
|
|
2946
|
-
<div class="command-option">
|
|
2947
|
-
<label class="text-xs font-medium text-muted-foreground mb-1 block">
|
|
2948
|
-
<i data-lucide="terminal" class="w-3 h-3 inline mr-1"></i>
|
|
2949
|
-
CCW CLI (${t('issues.alternative') || 'Alternative'})
|
|
2950
|
-
</label>
|
|
2951
|
-
<div class="command-box">
|
|
2952
|
-
<code class="command-text">${altCommand}</code>
|
|
2953
|
-
<button class="btn-icon" onclick="copyCommand('${altCommand}')" title="${t('common.copy') || 'Copy'}">
|
|
2954
|
-
<i data-lucide="copy" class="w-4 h-4"></i>
|
|
2955
|
-
</button>
|
|
2956
|
-
</div>
|
|
2957
|
-
</div>
|
|
2958
|
-
|
|
2959
|
-
<div class="command-info mt-4">
|
|
2960
|
-
<p class="text-xs text-muted-foreground">
|
|
2961
|
-
<i data-lucide="info" class="w-3 h-3 inline mr-1"></i>
|
|
2962
|
-
${t('issues.queueCommandInfo') || 'After running the command, click "Refresh" to see the updated queue.'}
|
|
2963
|
-
</p>
|
|
2964
|
-
</div>
|
|
2965
|
-
</div>
|
|
2966
|
-
<div class="issue-modal-footer">
|
|
2967
|
-
<button class="btn-secondary" onclick="hideQueueCommandModal()">${t('common.close') || 'Close'}</button>
|
|
2968
|
-
<button class="btn-primary" onclick="hideQueueCommandModal(); refreshQueue();">
|
|
2969
|
-
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
|
2970
|
-
${t('issues.refreshAfter') || 'Refresh Queue'}
|
|
2971
|
-
</button>
|
|
2972
|
-
</div>
|
|
2973
|
-
</div>
|
|
2974
|
-
`;
|
|
2975
|
-
|
|
2976
|
-
modal.classList.remove('hidden');
|
|
2977
|
-
lucide.createIcons();
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
|
-
function hideQueueCommandModal() {
|
|
2981
|
-
const modal = document.getElementById('queueCommandModal');
|
|
2982
|
-
if (modal) {
|
|
2983
|
-
modal.classList.add('hidden');
|
|
2984
|
-
}
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
// ========== Queue History Modal ==========
|
|
2988
|
-
async function showQueueHistoryModal() {
|
|
2989
|
-
// Create modal if not exists
|
|
2990
|
-
let modal = document.getElementById('queueHistoryModal');
|
|
2991
|
-
if (!modal) {
|
|
2992
|
-
modal = document.createElement('div');
|
|
2993
|
-
modal.id = 'queueHistoryModal';
|
|
2994
|
-
modal.className = 'issue-modal';
|
|
2995
|
-
document.body.appendChild(modal);
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
// Show loading state
|
|
2999
|
-
modal.innerHTML = `
|
|
3000
|
-
<div class="issue-modal-backdrop" onclick="hideQueueHistoryModal()"></div>
|
|
3001
|
-
<div class="issue-modal-content" style="max-width: 700px; max-height: 80vh;">
|
|
3002
|
-
<div class="issue-modal-header">
|
|
3003
|
-
<h3><i data-lucide="history" class="w-5 h-5 inline mr-2"></i>Queue History</h3>
|
|
3004
|
-
<button class="btn-icon" onclick="hideQueueHistoryModal()">
|
|
3005
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
3006
|
-
</button>
|
|
3007
|
-
</div>
|
|
3008
|
-
<div class="issue-modal-body" style="overflow-y: auto; max-height: calc(80vh - 120px);">
|
|
3009
|
-
<div class="flex items-center justify-center py-8">
|
|
3010
|
-
<i data-lucide="loader-2" class="w-6 h-6 animate-spin"></i>
|
|
3011
|
-
<span class="ml-2">Loading...</span>
|
|
3012
|
-
</div>
|
|
3013
|
-
</div>
|
|
3014
|
-
</div>
|
|
3015
|
-
`;
|
|
3016
|
-
modal.classList.remove('hidden');
|
|
3017
|
-
lucide.createIcons();
|
|
3018
|
-
|
|
3019
|
-
// Fetch queue history
|
|
3020
|
-
try {
|
|
3021
|
-
const response = await fetch(`/api/queue/history?path=${encodeURIComponent(projectPath)}`);
|
|
3022
|
-
const data = await response.json();
|
|
3023
|
-
|
|
3024
|
-
const queues = data.queues || [];
|
|
3025
|
-
const activeQueueId = data.active_queue_id;
|
|
3026
|
-
|
|
3027
|
-
// Render queue list
|
|
3028
|
-
const queueListHtml = queues.length === 0
|
|
3029
|
-
? `<div class="text-center py-8 text-muted-foreground">
|
|
3030
|
-
<i data-lucide="inbox" class="w-12 h-12 mx-auto mb-2 opacity-50"></i>
|
|
3031
|
-
<p>No queue history found</p>
|
|
3032
|
-
</div>`
|
|
3033
|
-
: `<div class="queue-history-list">
|
|
3034
|
-
${queues.map(q => `
|
|
3035
|
-
<div class="queue-history-item ${q.id === activeQueueId ? 'active' : ''}" onclick="viewQueueDetail('${q.id}')">
|
|
3036
|
-
<div class="queue-history-header">
|
|
3037
|
-
<span class="queue-history-id font-mono">${q.id}</span>
|
|
3038
|
-
${q.id === activeQueueId ? '<span class="queue-active-badge">Active</span>' : ''}
|
|
3039
|
-
<span class="queue-history-status ${q.status || ''}">${q.status || 'unknown'}</span>
|
|
3040
|
-
</div>
|
|
3041
|
-
<div class="queue-history-meta">
|
|
3042
|
-
<span class="text-xs text-muted-foreground">
|
|
3043
|
-
<i data-lucide="layers" class="w-3 h-3 inline"></i>
|
|
3044
|
-
${q.issue_ids?.length || 0} issues
|
|
3045
|
-
</span>
|
|
3046
|
-
<span class="text-xs text-muted-foreground">
|
|
3047
|
-
<i data-lucide="check-circle" class="w-3 h-3 inline"></i>
|
|
3048
|
-
${q.completed_solutions || q.completed_tasks || 0}/${q.total_solutions || q.total_tasks || 0} ${q.total_solutions ? 'solutions' : 'tasks'}
|
|
3049
|
-
</span>
|
|
3050
|
-
<span class="text-xs text-muted-foreground">
|
|
3051
|
-
<i data-lucide="calendar" class="w-3 h-3 inline"></i>
|
|
3052
|
-
${q.created_at ? new Date(q.created_at).toLocaleDateString() : 'N/A'}
|
|
3053
|
-
</span>
|
|
3054
|
-
</div>
|
|
3055
|
-
<div class="queue-history-actions">
|
|
3056
|
-
${q.id !== activeQueueId ? `
|
|
3057
|
-
<button class="btn-sm btn-primary" onclick="event.stopPropagation(); switchToQueue('${q.id}')">
|
|
3058
|
-
<i data-lucide="arrow-right-circle" class="w-3 h-3"></i>
|
|
3059
|
-
Switch
|
|
3060
|
-
</button>
|
|
3061
|
-
` : ''}
|
|
3062
|
-
<button class="btn-sm btn-secondary" onclick="event.stopPropagation(); viewQueueDetail('${q.id}')">
|
|
3063
|
-
<i data-lucide="eye" class="w-3 h-3"></i>
|
|
3064
|
-
View
|
|
3065
|
-
</button>
|
|
3066
|
-
</div>
|
|
3067
|
-
</div>
|
|
3068
|
-
`).join('')}
|
|
3069
|
-
</div>`;
|
|
3070
|
-
|
|
3071
|
-
modal.querySelector('.issue-modal-body').innerHTML = queueListHtml;
|
|
3072
|
-
lucide.createIcons();
|
|
3073
|
-
|
|
3074
|
-
} catch (err) {
|
|
3075
|
-
console.error('Failed to load queue history:', err);
|
|
3076
|
-
modal.querySelector('.issue-modal-body').innerHTML = `
|
|
3077
|
-
<div class="text-center py-8 text-red-500">
|
|
3078
|
-
<i data-lucide="alert-circle" class="w-8 h-8 mx-auto mb-2"></i>
|
|
3079
|
-
<p>Failed to load queue history</p>
|
|
3080
|
-
</div>
|
|
3081
|
-
`;
|
|
3082
|
-
lucide.createIcons();
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
|
|
3086
|
-
function hideQueueHistoryModal() {
|
|
3087
|
-
const modal = document.getElementById('queueHistoryModal');
|
|
3088
|
-
if (modal) {
|
|
3089
|
-
modal.classList.add('hidden');
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
async function switchToQueue(queueId) {
|
|
3094
|
-
try {
|
|
3095
|
-
const response = await fetch(`/api/queue/switch?path=${encodeURIComponent(projectPath)}`, {
|
|
3096
|
-
method: 'POST',
|
|
3097
|
-
headers: { 'Content-Type': 'application/json' },
|
|
3098
|
-
body: JSON.stringify({ queueId })
|
|
3099
|
-
});
|
|
3100
|
-
|
|
3101
|
-
const result = await response.json();
|
|
3102
|
-
if (result.success) {
|
|
3103
|
-
showNotification(t('issues.queueSwitched') || 'Switched to queue: ' + queueId, 'success');
|
|
3104
|
-
hideQueueHistoryModal();
|
|
3105
|
-
await loadQueueData();
|
|
3106
|
-
renderIssueView();
|
|
3107
|
-
} else {
|
|
3108
|
-
showNotification(result.error || 'Failed to switch queue', 'error');
|
|
3109
|
-
}
|
|
3110
|
-
} catch (err) {
|
|
3111
|
-
console.error('Failed to switch queue:', err);
|
|
3112
|
-
showNotification('Failed to switch queue', 'error');
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
async function viewQueueDetail(queueId) {
|
|
3117
|
-
const modal = document.getElementById('queueHistoryModal');
|
|
3118
|
-
if (!modal) return;
|
|
3119
|
-
|
|
3120
|
-
// Show loading
|
|
3121
|
-
modal.querySelector('.issue-modal-body').innerHTML = `
|
|
3122
|
-
<div class="flex items-center justify-center py-8">
|
|
3123
|
-
<i data-lucide="loader-2" class="w-6 h-6 animate-spin"></i>
|
|
3124
|
-
<span class="ml-2">${t('common.loading') || 'Loading...'}</span>
|
|
3125
|
-
</div>
|
|
3126
|
-
`;
|
|
3127
|
-
lucide.createIcons();
|
|
3128
|
-
|
|
3129
|
-
try {
|
|
3130
|
-
const response = await fetch(`/api/queue/${queueId}?path=${encodeURIComponent(projectPath)}`);
|
|
3131
|
-
const queue = await response.json();
|
|
3132
|
-
|
|
3133
|
-
if (queue.error) {
|
|
3134
|
-
throw new Error(queue.error);
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
// Support both solution-level and task-level queues
|
|
3138
|
-
const items = queue.solutions || queue.queue || queue.tasks || [];
|
|
3139
|
-
const isSolutionLevel = !!(queue.solutions && queue.solutions.length > 0);
|
|
3140
|
-
const metadata = queue._metadata || {};
|
|
3141
|
-
|
|
3142
|
-
// Group by execution_group
|
|
3143
|
-
const grouped = {};
|
|
3144
|
-
items.forEach(item => {
|
|
3145
|
-
const group = item.execution_group || 'ungrouped';
|
|
3146
|
-
if (!grouped[group]) grouped[group] = [];
|
|
3147
|
-
grouped[group].push(item);
|
|
3148
|
-
});
|
|
3149
|
-
|
|
3150
|
-
const itemLabel = isSolutionLevel ? 'solutions' : 'tasks';
|
|
3151
|
-
|
|
3152
|
-
const detailHtml = `
|
|
3153
|
-
<div class="queue-detail-view">
|
|
3154
|
-
<div class="queue-detail-header mb-4">
|
|
3155
|
-
<button class="btn-sm btn-secondary" onclick="showQueueHistoryModal()">
|
|
3156
|
-
<i data-lucide="arrow-left" class="w-3 h-3"></i>
|
|
3157
|
-
Back
|
|
3158
|
-
</button>
|
|
3159
|
-
<div class="ml-4">
|
|
3160
|
-
<h4 class="text-lg font-semibold">${queue.name || queue.id || queueId}</h4>
|
|
3161
|
-
${queue.name ? `<span class="text-xs text-muted-foreground font-mono">${queue.id}</span>` : ''}
|
|
3162
|
-
</div>
|
|
3163
|
-
</div>
|
|
3164
|
-
|
|
3165
|
-
<div class="queue-detail-stats mb-4">
|
|
3166
|
-
<div class="stat-item">
|
|
3167
|
-
<span class="stat-value">${items.length}</span>
|
|
3168
|
-
<span class="stat-label">${isSolutionLevel ? 'Solutions' : 'Total'}</span>
|
|
3169
|
-
</div>
|
|
3170
|
-
<div class="stat-item completed">
|
|
3171
|
-
<span class="stat-value">${items.filter(t => t.status === 'completed').length}</span>
|
|
3172
|
-
<span class="stat-label">Completed</span>
|
|
3173
|
-
</div>
|
|
3174
|
-
<div class="stat-item pending">
|
|
3175
|
-
<span class="stat-value">${items.filter(t => t.status === 'pending').length}</span>
|
|
3176
|
-
<span class="stat-label">Pending</span>
|
|
3177
|
-
</div>
|
|
3178
|
-
<div class="stat-item failed">
|
|
3179
|
-
<span class="stat-value">${items.filter(t => t.status === 'failed').length}</span>
|
|
3180
|
-
<span class="stat-label">Failed</span>
|
|
3181
|
-
</div>
|
|
3182
|
-
</div>
|
|
3183
|
-
|
|
3184
|
-
<div class="queue-detail-groups">
|
|
3185
|
-
${Object.entries(grouped).map(([groupId, groupItems]) => `
|
|
3186
|
-
<div class="queue-group-section">
|
|
3187
|
-
<div class="queue-group-header">
|
|
3188
|
-
<i data-lucide="folder" class="w-4 h-4"></i>
|
|
3189
|
-
<span>${groupId}</span>
|
|
3190
|
-
<span class="text-xs text-muted-foreground">(${groupItems.length} ${itemLabel})</span>
|
|
3191
|
-
</div>
|
|
3192
|
-
<div class="queue-group-items">
|
|
3193
|
-
${groupItems.map(item => `
|
|
3194
|
-
<div class="queue-detail-item ${item.status || ''}">
|
|
3195
|
-
<div class="item-main">
|
|
3196
|
-
<span class="item-id font-mono text-xs">${item.item_id || item.queue_id || item.task_id || 'N/A'}</span>
|
|
3197
|
-
<span class="item-title text-sm">${isSolutionLevel ? (item.task_count + ' tasks') : (item.title || item.action || 'Untitled')}</span>
|
|
3198
|
-
</div>
|
|
3199
|
-
<div class="item-meta">
|
|
3200
|
-
<span class="item-issue text-xs">${item.issue_id || ''}</span>
|
|
3201
|
-
${isSolutionLevel && item.files_touched ? `<span class="item-files text-xs">${item.files_touched.length} files</span>` : ''}
|
|
3202
|
-
<span class="item-status ${item.status || ''}">${item.status || 'unknown'}</span>
|
|
3203
|
-
</div>
|
|
3204
|
-
</div>
|
|
3205
|
-
`).join('')}
|
|
3206
|
-
</div>
|
|
3207
|
-
</div>
|
|
3208
|
-
`).join('')}
|
|
3209
|
-
</div>
|
|
3210
|
-
</div>
|
|
3211
|
-
`;
|
|
3212
|
-
|
|
3213
|
-
modal.querySelector('.issue-modal-body').innerHTML = detailHtml;
|
|
3214
|
-
lucide.createIcons();
|
|
3215
|
-
|
|
3216
|
-
} catch (err) {
|
|
3217
|
-
console.error('Failed to load queue detail:', err);
|
|
3218
|
-
modal.querySelector('.issue-modal-body').innerHTML = `
|
|
3219
|
-
<div class="text-center py-8">
|
|
3220
|
-
<button class="btn-sm btn-secondary mb-4" onclick="showQueueHistoryModal()">
|
|
3221
|
-
<i data-lucide="arrow-left" class="w-3 h-3"></i>
|
|
3222
|
-
Back
|
|
3223
|
-
</button>
|
|
3224
|
-
<div class="text-red-500">
|
|
3225
|
-
<i data-lucide="alert-circle" class="w-8 h-8 mx-auto mb-2"></i>
|
|
3226
|
-
<p>Failed to load queue detail</p>
|
|
3227
|
-
</div>
|
|
3228
|
-
</div>
|
|
3229
|
-
`;
|
|
3230
|
-
lucide.createIcons();
|
|
3231
|
-
}
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
|
-
function copyCommand(command) {
|
|
3235
|
-
navigator.clipboard.writeText(command).then(() => {
|
|
3236
|
-
showNotification(t('common.copied') || 'Copied to clipboard', 'success');
|
|
3237
|
-
}).catch(err => {
|
|
3238
|
-
console.error('Failed to copy:', err);
|
|
3239
|
-
// Fallback: select text
|
|
3240
|
-
const textArea = document.createElement('textarea');
|
|
3241
|
-
textArea.value = command;
|
|
3242
|
-
document.body.appendChild(textArea);
|
|
3243
|
-
textArea.select();
|
|
3244
|
-
document.execCommand('copy');
|
|
3245
|
-
document.body.removeChild(textArea);
|
|
3246
|
-
showNotification(t('common.copied') || 'Copied to clipboard', 'success');
|
|
3247
|
-
});
|
|
3248
|
-
}
|