@nexus-cortex/cli 4.26.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/.cortex/agents/AGENT_PROFILE_GUIDE.md +307 -0
- package/.cortex/agents/README.md +268 -0
- package/.cortex/agents/a-frontend-landing-page-designer.md +41 -0
- package/.cortex/agents/autoresearch-agent.md +49 -0
- package/.cortex/agents/code-reviewer.md +63 -0
- package/.cortex/agents/context-research.md +26 -0
- package/.cortex/agents/doc-writer.md +92 -0
- package/.cortex/agents/explore.md +63 -0
- package/.cortex/agents/new-model-api-integrator-analyst.md +41 -0
- package/.cortex/agents/plan.md +109 -0
- package/.cortex/agents/pr-architecture-reviewer.md +77 -0
- package/.cortex/agents/pr-code-quality.md +78 -0
- package/.cortex/agents/pr-implementer.md +50 -0
- package/.cortex/agents/pr-security-auditor.md +62 -0
- package/.cortex/agents/pr-test-writer.md +67 -0
- package/.cortex/agents/refactor.md +118 -0
- package/.cortex/agents/test-writer.md +72 -0
- package/.cortex/agents/web-researcher.md +72 -0
- package/.cortex/bench/tasks/sample-tasks.json +20 -0
- package/.cortex/commands/compare.md +14 -0
- package/.cortex/commands/deps.md +16 -0
- package/.cortex/commands/diff.md +14 -0
- package/.cortex/commands/explain.md +16 -0
- package/.cortex/commands/find-bug.md +13 -0
- package/.cortex/commands/profile.md +15 -0
- package/.cortex/commands/review.md +18 -0
- package/.cortex/commands/search.md +16 -0
- package/.cortex/commands/test.md +15 -0
- package/.cortex/permissions.dev.json +20 -0
- package/.cortex/permissions.example.json +71 -0
- package/.cortex/permissions.prod.json +63 -0
- package/.cortex/permissions.test.json +19 -0
- package/.cortex/skills/autoresearch/SKILL.md +77 -0
- package/.cortex/skills/autoresearch/personas/README.md +45 -0
- package/.cortex/skills/autoresearch/personas/aggressive-refactor.md +25 -0
- package/.cortex/skills/autoresearch/personas/creative.md +29 -0
- package/.cortex/skills/autoresearch/personas/perf-hunter.md +27 -0
- package/.cortex/skills/autoresearch/personas/precise.md +23 -0
- package/.cortex/skills/autoresearch/personas/root-cause.md +26 -0
- package/.cortex/skills/autoresearch/personas/security-auditor.md +29 -0
- package/.cortex/skills/autoresearch/personas/skeptic-reviewer.md +31 -0
- package/.cortex/skills/autoresearch/personas/test-first.md +25 -0
- package/.cortex/skills/best-of-n/SKILL.md +76 -0
- package/.cortex/skills/cortex/SKILL.md +834 -0
- package/.cortex/skills/cortex-bench/SKILL.md +354 -0
- package/.cortex/skills/docx/SKILL.md +83 -0
- package/.cortex/skills/pdf-documents/SKILL.md +297 -0
- package/.cortex/skills/pdf-documents/sections/01-image-acquisition.md +132 -0
- package/.cortex/skills/pdf-documents/sections/02-ai-image-generation.md +274 -0
- package/.cortex/skills/pdf-documents/sections/03-paper-sizes.md +89 -0
- package/.cortex/skills/pdf-documents/sections/04-design-system.md +549 -0
- package/.cortex/skills/pdf-documents/sections/05-css-print-rules.md +135 -0
- package/.cortex/skills/pdf-documents/sections/06-svg-charts.md +100 -0
- package/.cortex/skills/pdf-documents/sections/07-templates.md +224 -0
- package/.cortex/skills/pdf-documents/sections/08-scaled-output.md +164 -0
- package/.cortex/skills/pdf-documents/sections/09-preview-qa.md +66 -0
- package/.cortex/skills/pdf-documents/sections/10-reading-pdfs.md +499 -0
- package/.cortex/skills/pdf-documents/sections/11-form-filling.md +241 -0
- package/.cortex/skills/pptx/SKILL.md +90 -0
- package/.cortex/skills/resume-analyst/SKILL.md +373 -0
- package/.cortex/skills/verify-work/SKILL.md +74 -0
- package/.cortex/skills/xlsx/SKILL.md +101 -0
- package/.cortex/system-messages/messages/WORK_QUALITY.md +159 -0
- package/.cortex/system-messages/registry.json +18 -0
- package/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +13 -0
- package/bin/cortex.js +548 -0
- package/dist/agent-mode.d.ts +21 -0
- package/dist/agent-mode.d.ts.map +1 -0
- package/dist/agent-mode.js +511 -0
- package/dist/agent-mode.js.map +1 -0
- package/dist/client/CortexClient.d.ts +84 -0
- package/dist/client/CortexClient.d.ts.map +1 -0
- package/dist/client/CortexClient.js +163 -0
- package/dist/client/CortexClient.js.map +1 -0
- package/dist/commands/artifact/list.d.ts +15 -0
- package/dist/commands/artifact/list.d.ts.map +1 -0
- package/dist/commands/artifact/list.js +89 -0
- package/dist/commands/artifact/list.js.map +1 -0
- package/dist/commands/artifact/restart.d.ts +13 -0
- package/dist/commands/artifact/restart.d.ts.map +1 -0
- package/dist/commands/artifact/restart.js +56 -0
- package/dist/commands/artifact/restart.js.map +1 -0
- package/dist/commands/artifact/status.d.ts +13 -0
- package/dist/commands/artifact/status.d.ts.map +1 -0
- package/dist/commands/artifact/status.js +100 -0
- package/dist/commands/artifact/status.js.map +1 -0
- package/dist/commands/artifact/stop.d.ts +13 -0
- package/dist/commands/artifact/stop.d.ts.map +1 -0
- package/dist/commands/artifact/stop.js +50 -0
- package/dist/commands/artifact/stop.js.map +1 -0
- package/dist/commands/autoresearch/bench.d.ts +32 -0
- package/dist/commands/autoresearch/bench.d.ts.map +1 -0
- package/dist/commands/autoresearch/bench.js +123 -0
- package/dist/commands/autoresearch/bench.js.map +1 -0
- package/dist/commands/autoresearch/commandRunner.d.ts +35 -0
- package/dist/commands/autoresearch/commandRunner.d.ts.map +1 -0
- package/dist/commands/autoresearch/commandRunner.js +91 -0
- package/dist/commands/autoresearch/commandRunner.js.map +1 -0
- package/dist/commands/autoresearch/evaluate.d.ts +18 -0
- package/dist/commands/autoresearch/evaluate.d.ts.map +1 -0
- package/dist/commands/autoresearch/evaluate.js +117 -0
- package/dist/commands/autoresearch/evaluate.js.map +1 -0
- package/dist/commands/autoresearch/experiment.d.ts +38 -0
- package/dist/commands/autoresearch/experiment.d.ts.map +1 -0
- package/dist/commands/autoresearch/experiment.js +168 -0
- package/dist/commands/autoresearch/experiment.js.map +1 -0
- package/dist/commands/autoresearch/fix.d.ts +10 -0
- package/dist/commands/autoresearch/fix.d.ts.map +1 -0
- package/dist/commands/autoresearch/fix.js +86 -0
- package/dist/commands/autoresearch/fix.js.map +1 -0
- package/dist/commands/autoresearch/harnessProcess.d.ts +48 -0
- package/dist/commands/autoresearch/harnessProcess.d.ts.map +1 -0
- package/dist/commands/autoresearch/harnessProcess.js +140 -0
- package/dist/commands/autoresearch/harnessProcess.js.map +1 -0
- package/dist/commands/autoresearch/list.d.ts +6 -0
- package/dist/commands/autoresearch/list.d.ts.map +1 -0
- package/dist/commands/autoresearch/list.js +38 -0
- package/dist/commands/autoresearch/list.js.map +1 -0
- package/dist/commands/autoresearch/loop.d.ts +26 -0
- package/dist/commands/autoresearch/loop.d.ts.map +1 -0
- package/dist/commands/autoresearch/loop.js +242 -0
- package/dist/commands/autoresearch/loop.js.map +1 -0
- package/dist/commands/cache/metrics.d.ts +13 -0
- package/dist/commands/cache/metrics.d.ts.map +1 -0
- package/dist/commands/cache/metrics.js +77 -0
- package/dist/commands/cache/metrics.js.map +1 -0
- package/dist/commands/chat/AgenticChat.d.ts +39 -0
- package/dist/commands/chat/AgenticChat.d.ts.map +1 -0
- package/dist/commands/chat/AgenticChat.js +201 -0
- package/dist/commands/chat/AgenticChat.js.map +1 -0
- package/dist/commands/chat/renderers/CodeRenderer.d.ts +36 -0
- package/dist/commands/chat/renderers/CodeRenderer.d.ts.map +1 -0
- package/dist/commands/chat/renderers/CodeRenderer.js +85 -0
- package/dist/commands/chat/renderers/CodeRenderer.js.map +1 -0
- package/dist/commands/chat/renderers/ToolRenderer.d.ts +30 -0
- package/dist/commands/chat/renderers/ToolRenderer.d.ts.map +1 -0
- package/dist/commands/chat/renderers/ToolRenderer.js +93 -0
- package/dist/commands/chat/renderers/ToolRenderer.js.map +1 -0
- package/dist/commands/chat/single-message.d.ts +15 -0
- package/dist/commands/chat/single-message.d.ts.map +1 -0
- package/dist/commands/chat/single-message.js +85 -0
- package/dist/commands/chat/single-message.js.map +1 -0
- package/dist/commands/config/categories.d.ts +8 -0
- package/dist/commands/config/categories.d.ts.map +1 -0
- package/dist/commands/config/categories.js +75 -0
- package/dist/commands/config/categories.js.map +1 -0
- package/dist/commands/config/category.d.ts +8 -0
- package/dist/commands/config/category.d.ts.map +1 -0
- package/dist/commands/config/category.js +81 -0
- package/dist/commands/config/category.js.map +1 -0
- package/dist/commands/config/get.d.ts +9 -0
- package/dist/commands/config/get.d.ts.map +1 -0
- package/dist/commands/config/get.js +98 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/reset.d.ts +6 -0
- package/dist/commands/config/reset.d.ts.map +1 -0
- package/dist/commands/config/reset.js +68 -0
- package/dist/commands/config/reset.js.map +1 -0
- package/dist/commands/config/set.d.ts +6 -0
- package/dist/commands/config/set.d.ts.map +1 -0
- package/dist/commands/config/set.js +60 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/config/utils.d.ts +14 -0
- package/dist/commands/config/utils.d.ts.map +1 -0
- package/dist/commands/config/utils.js +54 -0
- package/dist/commands/config/utils.js.map +1 -0
- package/dist/commands/context/boundaries.d.ts +13 -0
- package/dist/commands/context/boundaries.d.ts.map +1 -0
- package/dist/commands/context/boundaries.js +45 -0
- package/dist/commands/context/boundaries.js.map +1 -0
- package/dist/commands/context/compact.d.ts +13 -0
- package/dist/commands/context/compact.d.ts.map +1 -0
- package/dist/commands/context/compact.js +41 -0
- package/dist/commands/context/compact.js.map +1 -0
- package/dist/commands/context/savings.d.ts +13 -0
- package/dist/commands/context/savings.d.ts.map +1 -0
- package/dist/commands/context/savings.js +49 -0
- package/dist/commands/context/savings.js.map +1 -0
- package/dist/commands/context/status.d.ts +13 -0
- package/dist/commands/context/status.d.ts.map +1 -0
- package/dist/commands/context/status.js +52 -0
- package/dist/commands/context/status.js.map +1 -0
- package/dist/commands/context/strategy.d.ts +13 -0
- package/dist/commands/context/strategy.d.ts.map +1 -0
- package/dist/commands/context/strategy.js +66 -0
- package/dist/commands/context/strategy.js.map +1 -0
- package/dist/commands/mcp/disable.d.ts +5 -0
- package/dist/commands/mcp/disable.d.ts.map +1 -0
- package/dist/commands/mcp/disable.js +26 -0
- package/dist/commands/mcp/disable.js.map +1 -0
- package/dist/commands/mcp/edit.d.ts +9 -0
- package/dist/commands/mcp/edit.d.ts.map +1 -0
- package/dist/commands/mcp/edit.js +62 -0
- package/dist/commands/mcp/edit.js.map +1 -0
- package/dist/commands/mcp/enable.d.ts +5 -0
- package/dist/commands/mcp/enable.d.ts.map +1 -0
- package/dist/commands/mcp/enable.js +27 -0
- package/dist/commands/mcp/enable.js.map +1 -0
- package/dist/commands/mcp/init.d.ts +9 -0
- package/dist/commands/mcp/init.d.ts.map +1 -0
- package/dist/commands/mcp/init.js +97 -0
- package/dist/commands/mcp/init.js.map +1 -0
- package/dist/commands/mcp/list.d.ts +6 -0
- package/dist/commands/mcp/list.d.ts.map +1 -0
- package/dist/commands/mcp/list.js +56 -0
- package/dist/commands/mcp/list.js.map +1 -0
- package/dist/commands/mcp/server.d.ts +6 -0
- package/dist/commands/mcp/server.d.ts.map +1 -0
- package/dist/commands/mcp/server.js +44 -0
- package/dist/commands/mcp/server.js.map +1 -0
- package/dist/commands/mcp/status.d.ts +6 -0
- package/dist/commands/mcp/status.d.ts.map +1 -0
- package/dist/commands/mcp/status.js +43 -0
- package/dist/commands/mcp/status.js.map +1 -0
- package/dist/commands/mcp/tools.d.ts +7 -0
- package/dist/commands/mcp/tools.d.ts.map +1 -0
- package/dist/commands/mcp/tools.js +82 -0
- package/dist/commands/mcp/tools.js.map +1 -0
- package/dist/commands/mcp/validate.d.ts +8 -0
- package/dist/commands/mcp/validate.d.ts.map +1 -0
- package/dist/commands/mcp/validate.js +121 -0
- package/dist/commands/mcp/validate.js.map +1 -0
- package/dist/commands/middleware/config.d.ts +13 -0
- package/dist/commands/middleware/config.d.ts.map +1 -0
- package/dist/commands/middleware/config.js +87 -0
- package/dist/commands/middleware/config.js.map +1 -0
- package/dist/commands/middleware/disable.d.ts +13 -0
- package/dist/commands/middleware/disable.d.ts.map +1 -0
- package/dist/commands/middleware/disable.js +50 -0
- package/dist/commands/middleware/disable.js.map +1 -0
- package/dist/commands/middleware/enable.d.ts +13 -0
- package/dist/commands/middleware/enable.d.ts.map +1 -0
- package/dist/commands/middleware/enable.js +50 -0
- package/dist/commands/middleware/enable.js.map +1 -0
- package/dist/commands/middleware/list.d.ts +13 -0
- package/dist/commands/middleware/list.d.ts.map +1 -0
- package/dist/commands/middleware/list.js +64 -0
- package/dist/commands/middleware/list.js.map +1 -0
- package/dist/commands/middleware/status.d.ts +13 -0
- package/dist/commands/middleware/status.d.ts.map +1 -0
- package/dist/commands/middleware/status.js +80 -0
- package/dist/commands/middleware/status.js.map +1 -0
- package/dist/commands/models/compare.d.ts +9 -0
- package/dist/commands/models/compare.d.ts.map +1 -0
- package/dist/commands/models/compare.js +76 -0
- package/dist/commands/models/compare.js.map +1 -0
- package/dist/commands/models/cost.d.ts +9 -0
- package/dist/commands/models/cost.d.ts.map +1 -0
- package/dist/commands/models/cost.js +64 -0
- package/dist/commands/models/cost.js.map +1 -0
- package/dist/commands/models/info.d.ts +9 -0
- package/dist/commands/models/info.d.ts.map +1 -0
- package/dist/commands/models/info.js +61 -0
- package/dist/commands/models/info.js.map +1 -0
- package/dist/commands/models/list.d.ts +6 -0
- package/dist/commands/models/list.d.ts.map +1 -0
- package/dist/commands/models/list.js +66 -0
- package/dist/commands/models/list.js.map +1 -0
- package/dist/commands/models/providers.d.ts +13 -0
- package/dist/commands/models/providers.d.ts.map +1 -0
- package/dist/commands/models/providers.js +45 -0
- package/dist/commands/models/providers.js.map +1 -0
- package/dist/commands/models/search.d.ts +10 -0
- package/dist/commands/models/search.d.ts.map +1 -0
- package/dist/commands/models/search.js +56 -0
- package/dist/commands/models/search.js.map +1 -0
- package/dist/commands/models/switch.d.ts +14 -0
- package/dist/commands/models/switch.d.ts.map +1 -0
- package/dist/commands/models/switch.js +67 -0
- package/dist/commands/models/switch.js.map +1 -0
- package/dist/commands/permissions/auto-approve.d.ts +13 -0
- package/dist/commands/permissions/auto-approve.d.ts.map +1 -0
- package/dist/commands/permissions/auto-approve.js +53 -0
- package/dist/commands/permissions/auto-approve.js.map +1 -0
- package/dist/commands/permissions/grant.d.ts +13 -0
- package/dist/commands/permissions/grant.d.ts.map +1 -0
- package/dist/commands/permissions/grant.js +46 -0
- package/dist/commands/permissions/grant.js.map +1 -0
- package/dist/commands/permissions/mode.d.ts +12 -0
- package/dist/commands/permissions/mode.d.ts.map +1 -0
- package/dist/commands/permissions/mode.js +61 -0
- package/dist/commands/permissions/mode.js.map +1 -0
- package/dist/commands/permissions/policies.d.ts +13 -0
- package/dist/commands/permissions/policies.d.ts.map +1 -0
- package/dist/commands/permissions/policies.js +47 -0
- package/dist/commands/permissions/policies.js.map +1 -0
- package/dist/commands/permissions/revoke.d.ts +13 -0
- package/dist/commands/permissions/revoke.d.ts.map +1 -0
- package/dist/commands/permissions/revoke.js +46 -0
- package/dist/commands/permissions/revoke.js.map +1 -0
- package/dist/commands/permissions/set.d.ts +13 -0
- package/dist/commands/permissions/set.d.ts.map +1 -0
- package/dist/commands/permissions/set.js +57 -0
- package/dist/commands/permissions/set.js.map +1 -0
- package/dist/commands/permissions/tools.d.ts +13 -0
- package/dist/commands/permissions/tools.d.ts.map +1 -0
- package/dist/commands/permissions/tools.js +50 -0
- package/dist/commands/permissions/tools.js.map +1 -0
- package/dist/commands/server/start.d.ts +11 -0
- package/dist/commands/server/start.d.ts.map +1 -0
- package/dist/commands/server/start.js +58 -0
- package/dist/commands/server/start.js.map +1 -0
- package/dist/commands/session/checkpoints.d.ts +6 -0
- package/dist/commands/session/checkpoints.d.ts.map +1 -0
- package/dist/commands/session/checkpoints.js +41 -0
- package/dist/commands/session/checkpoints.js.map +1 -0
- package/dist/commands/session/compact.d.ts +13 -0
- package/dist/commands/session/compact.d.ts.map +1 -0
- package/dist/commands/session/compact.js +56 -0
- package/dist/commands/session/compact.js.map +1 -0
- package/dist/commands/session/export.d.ts +6 -0
- package/dist/commands/session/export.d.ts.map +1 -0
- package/dist/commands/session/export.js +31 -0
- package/dist/commands/session/export.js.map +1 -0
- package/dist/commands/session/list.d.ts +7 -0
- package/dist/commands/session/list.d.ts.map +1 -0
- package/dist/commands/session/list.js +63 -0
- package/dist/commands/session/list.js.map +1 -0
- package/dist/commands/session/new.d.ts +8 -0
- package/dist/commands/session/new.d.ts.map +1 -0
- package/dist/commands/session/new.js +23 -0
- package/dist/commands/session/new.js.map +1 -0
- package/dist/commands/session/resume.d.ts +6 -0
- package/dist/commands/session/resume.d.ts.map +1 -0
- package/dist/commands/session/resume.js +32 -0
- package/dist/commands/session/resume.js.map +1 -0
- package/dist/commands/session/search.d.ts +10 -0
- package/dist/commands/session/search.d.ts.map +1 -0
- package/dist/commands/session/search.js +65 -0
- package/dist/commands/session/search.js.map +1 -0
- package/dist/commands/session/stats.d.ts +6 -0
- package/dist/commands/session/stats.d.ts.map +1 -0
- package/dist/commands/session/stats.js +58 -0
- package/dist/commands/session/stats.js.map +1 -0
- package/dist/commands/session/view.d.ts +6 -0
- package/dist/commands/session/view.d.ts.map +1 -0
- package/dist/commands/session/view.js +65 -0
- package/dist/commands/session/view.js.map +1 -0
- package/dist/commands/slash/CommandPalette.d.ts +60 -0
- package/dist/commands/slash/CommandPalette.d.ts.map +1 -0
- package/dist/commands/slash/CommandPalette.js +351 -0
- package/dist/commands/slash/CommandPalette.js.map +1 -0
- package/dist/commands/slash/SlashCommandParser.d.ts +11 -0
- package/dist/commands/slash/SlashCommandParser.d.ts.map +1 -0
- package/dist/commands/slash/SlashCommandParser.js +11 -0
- package/dist/commands/slash/SlashCommandParser.js.map +1 -0
- package/dist/commands/slash/SlashCommandRegistry.d.ts +11 -0
- package/dist/commands/slash/SlashCommandRegistry.d.ts.map +1 -0
- package/dist/commands/slash/SlashCommandRegistry.js +11 -0
- package/dist/commands/slash/SlashCommandRegistry.js.map +1 -0
- package/dist/commands/slash/index.d.ts +11 -0
- package/dist/commands/slash/index.d.ts.map +1 -0
- package/dist/commands/slash/index.js +13 -0
- package/dist/commands/slash/index.js.map +1 -0
- package/dist/commands/system-messages/list.d.ts +13 -0
- package/dist/commands/system-messages/list.d.ts.map +1 -0
- package/dist/commands/system-messages/list.js +54 -0
- package/dist/commands/system-messages/list.js.map +1 -0
- package/dist/commands/system-messages/reload.d.ts +13 -0
- package/dist/commands/system-messages/reload.d.ts.map +1 -0
- package/dist/commands/system-messages/reload.js +36 -0
- package/dist/commands/system-messages/reload.js.map +1 -0
- package/dist/commands/system-messages/view.d.ts +13 -0
- package/dist/commands/system-messages/view.d.ts.map +1 -0
- package/dist/commands/system-messages/view.js +52 -0
- package/dist/commands/system-messages/view.js.map +1 -0
- package/dist/commands/tmux/list.d.ts +13 -0
- package/dist/commands/tmux/list.d.ts.map +1 -0
- package/dist/commands/tmux/list.js +68 -0
- package/dist/commands/tmux/list.js.map +1 -0
- package/dist/commands/tools/info.d.ts +13 -0
- package/dist/commands/tools/info.d.ts.map +1 -0
- package/dist/commands/tools/info.js +82 -0
- package/dist/commands/tools/info.js.map +1 -0
- package/dist/commands/tools/list.d.ts +14 -0
- package/dist/commands/tools/list.d.ts.map +1 -0
- package/dist/commands/tools/list.js +67 -0
- package/dist/commands/tools/list.js.map +1 -0
- package/dist/config/ConfigManager.d.ts +40 -0
- package/dist/config/ConfigManager.d.ts.map +1 -0
- package/dist/config/ConfigManager.js +162 -0
- package/dist/config/ConfigManager.js.map +1 -0
- package/dist/config/extension.d.ts +12 -0
- package/dist/config/extension.d.ts.map +1 -0
- package/dist/config/extension.js +5 -0
- package/dist/config/extension.js.map +1 -0
- package/dist/config/settings.d.ts +42 -0
- package/dist/config/settings.d.ts.map +1 -0
- package/dist/config/settings.js +32 -0
- package/dist/config/settings.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +883 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestrator/OrchestratorClient.d.ts +385 -0
- package/dist/orchestrator/OrchestratorClient.d.ts.map +1 -0
- package/dist/orchestrator/OrchestratorClient.js +1195 -0
- package/dist/orchestrator/OrchestratorClient.js.map +1 -0
- package/dist/themes/DefaultTheme.d.ts +9 -0
- package/dist/themes/DefaultTheme.d.ts.map +1 -0
- package/dist/themes/DefaultTheme.js +29 -0
- package/dist/themes/DefaultTheme.js.map +1 -0
- package/dist/themes/MinimalTheme.d.ts +9 -0
- package/dist/themes/MinimalTheme.d.ts.map +1 -0
- package/dist/themes/MinimalTheme.js +29 -0
- package/dist/themes/MinimalTheme.js.map +1 -0
- package/dist/themes/Theme.interface.d.ts +36 -0
- package/dist/themes/Theme.interface.d.ts.map +1 -0
- package/dist/themes/Theme.interface.js +5 -0
- package/dist/themes/Theme.interface.js.map +1 -0
- package/dist/themes/ThemeManager.d.ts +63 -0
- package/dist/themes/ThemeManager.d.ts.map +1 -0
- package/dist/themes/ThemeManager.js +257 -0
- package/dist/themes/ThemeManager.js.map +1 -0
- package/dist/themes/colors.d.ts +108 -0
- package/dist/themes/colors.d.ts.map +1 -0
- package/dist/themes/colors.js +284 -0
- package/dist/themes/colors.js.map +1 -0
- package/dist/themes/createTheme.d.ts +40 -0
- package/dist/themes/createTheme.d.ts.map +1 -0
- package/dist/themes/createTheme.js +114 -0
- package/dist/themes/createTheme.js.map +1 -0
- package/dist/themes/themeDefinitions.d.ts +27 -0
- package/dist/themes/themeDefinitions.d.ts.map +1 -0
- package/dist/themes/themeDefinitions.js +244 -0
- package/dist/themes/themeDefinitions.js.map +1 -0
- package/dist/utils/CodeDiffRenderer.d.ts +124 -0
- package/dist/utils/CodeDiffRenderer.d.ts.map +1 -0
- package/dist/utils/CodeDiffRenderer.js +257 -0
- package/dist/utils/CodeDiffRenderer.js.map +1 -0
- package/dist/utils/MarkdownRenderer.d.ts +74 -0
- package/dist/utils/MarkdownRenderer.d.ts.map +1 -0
- package/dist/utils/MarkdownRenderer.js +260 -0
- package/dist/utils/MarkdownRenderer.js.map +1 -0
- package/dist/utils/MessageRenderer.d.ts +200 -0
- package/dist/utils/MessageRenderer.d.ts.map +1 -0
- package/dist/utils/MessageRenderer.js +283 -0
- package/dist/utils/MessageRenderer.js.map +1 -0
- package/dist/utils/ToolFormatter.d.ts +103 -0
- package/dist/utils/ToolFormatter.d.ts.map +1 -0
- package/dist/utils/ToolFormatter.js +357 -0
- package/dist/utils/ToolFormatter.js.map +1 -0
- package/dist/utils/boxDrawing.d.ts +23 -0
- package/dist/utils/boxDrawing.d.ts.map +1 -0
- package/dist/utils/boxDrawing.js +78 -0
- package/dist/utils/boxDrawing.js.map +1 -0
- package/dist/utils/checks.d.ts +9 -0
- package/dist/utils/checks.d.ts.map +1 -0
- package/dist/utils/checks.js +11 -0
- package/dist/utils/checks.js.map +1 -0
- package/dist/utils/events.d.ts +24 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +17 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/formatters.d.ts +255 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +361 -0
- package/dist/utils/formatters.js.map +1 -0
- package/dist/utils/math.d.ts +11 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.js +13 -0
- package/dist/utils/math.js.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownRenderer - Render markdown text to styled terminal output
|
|
3
|
+
*
|
|
4
|
+
* Converts streaming markdown text to formatted terminal output with:
|
|
5
|
+
* - Headers (# ## ###)
|
|
6
|
+
* - Code blocks (```)
|
|
7
|
+
* - Inline code (`code`)
|
|
8
|
+
* - Bold (**text**)
|
|
9
|
+
* - Italic (*text*)
|
|
10
|
+
* - Lists (- item, 1. item)
|
|
11
|
+
* - Links ([text](url))
|
|
12
|
+
* - Blockquotes (> text)
|
|
13
|
+
*
|
|
14
|
+
* @module MarkdownRenderer
|
|
15
|
+
*/
|
|
16
|
+
export interface MarkdownRenderOptions {
|
|
17
|
+
/** Width for wrapping text (default: terminal width or 80) */
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
/** Enable syntax highlighting in code blocks */
|
|
20
|
+
syntaxHighlight?: boolean;
|
|
21
|
+
/** Indentation for text blocks (default: 2 spaces) */
|
|
22
|
+
indent?: string;
|
|
23
|
+
/** Use dynamic terminal width (default: true) */
|
|
24
|
+
dynamicWidth?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Stateful markdown renderer for streaming text
|
|
28
|
+
*/
|
|
29
|
+
export declare class MarkdownRenderer {
|
|
30
|
+
private theme;
|
|
31
|
+
private options;
|
|
32
|
+
private inCodeBlock;
|
|
33
|
+
private codeBlockLanguage;
|
|
34
|
+
private buffer;
|
|
35
|
+
constructor(options?: MarkdownRenderOptions);
|
|
36
|
+
/**
|
|
37
|
+
* Get current rendering width (terminal width or configured max)
|
|
38
|
+
*/
|
|
39
|
+
private getCurrentWidth;
|
|
40
|
+
/**
|
|
41
|
+
* Process streaming text chunk and return formatted output
|
|
42
|
+
*/
|
|
43
|
+
processChunk(chunk: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Flush any remaining buffered content
|
|
46
|
+
*/
|
|
47
|
+
flush(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Format a single line of markdown
|
|
50
|
+
*/
|
|
51
|
+
private formatLine;
|
|
52
|
+
/**
|
|
53
|
+
* Format inline markdown elements
|
|
54
|
+
*/
|
|
55
|
+
private formatInline;
|
|
56
|
+
/**
|
|
57
|
+
* Format a line inside a code block
|
|
58
|
+
*/
|
|
59
|
+
private formatCodeLine;
|
|
60
|
+
/**
|
|
61
|
+
* Apply basic syntax highlighting to code
|
|
62
|
+
*/
|
|
63
|
+
private highlightCode;
|
|
64
|
+
/**
|
|
65
|
+
* Wrap text at word boundaries
|
|
66
|
+
* Note: This strips ANSI codes for width calculation but preserves them in output
|
|
67
|
+
*/
|
|
68
|
+
private wrapText;
|
|
69
|
+
/**
|
|
70
|
+
* Reset renderer state
|
|
71
|
+
*/
|
|
72
|
+
reset(): void;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=MarkdownRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../src/utils/MarkdownRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,MAAM,CAAc;gBAEhB,OAAO,GAAE,qBAA0B;IAU/C;;OAEG;IACH,OAAO,CAAC,eAAe;IAOvB;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAoBnC;;OAEG;IACH,KAAK,IAAI,MAAM;IASf;;OAEG;IACH,OAAO,CAAC,UAAU;IAuFlB;;OAEG;IACH,OAAO,CAAC,YAAY;IAgCpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAUtB;;OAEG;IACH,OAAO,CAAC,aAAa;IAyBrB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAsChB;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownRenderer - Render markdown text to styled terminal output
|
|
3
|
+
*
|
|
4
|
+
* Converts streaming markdown text to formatted terminal output with:
|
|
5
|
+
* - Headers (# ## ###)
|
|
6
|
+
* - Code blocks (```)
|
|
7
|
+
* - Inline code (`code`)
|
|
8
|
+
* - Bold (**text**)
|
|
9
|
+
* - Italic (*text*)
|
|
10
|
+
* - Lists (- item, 1. item)
|
|
11
|
+
* - Links ([text](url))
|
|
12
|
+
* - Blockquotes (> text)
|
|
13
|
+
*
|
|
14
|
+
* @module MarkdownRenderer
|
|
15
|
+
*/
|
|
16
|
+
import chalk from 'chalk';
|
|
17
|
+
import { ThemeManager } from '../themes/ThemeManager.js';
|
|
18
|
+
/**
|
|
19
|
+
* Stateful markdown renderer for streaming text
|
|
20
|
+
*/
|
|
21
|
+
export class MarkdownRenderer {
|
|
22
|
+
theme;
|
|
23
|
+
options;
|
|
24
|
+
inCodeBlock = false;
|
|
25
|
+
codeBlockLanguage = '';
|
|
26
|
+
buffer = '';
|
|
27
|
+
constructor(options = {}) {
|
|
28
|
+
this.theme = ThemeManager.getExtendedTheme();
|
|
29
|
+
this.options = {
|
|
30
|
+
maxWidth: options.maxWidth ?? 80,
|
|
31
|
+
syntaxHighlight: options.syntaxHighlight ?? false,
|
|
32
|
+
indent: options.indent ?? ' ', // 2 spaces by default
|
|
33
|
+
dynamicWidth: options.dynamicWidth ?? true
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get current rendering width (terminal width or configured max)
|
|
38
|
+
*/
|
|
39
|
+
getCurrentWidth() {
|
|
40
|
+
if (this.options.dynamicWidth && process.stdout.columns) {
|
|
41
|
+
return process.stdout.columns;
|
|
42
|
+
}
|
|
43
|
+
return this.options.maxWidth;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Process streaming text chunk and return formatted output
|
|
47
|
+
*/
|
|
48
|
+
processChunk(chunk) {
|
|
49
|
+
this.buffer += chunk;
|
|
50
|
+
// Normalize list items: Replace patterns like " • " or " - " in the middle of lines
|
|
51
|
+
// with proper newlines to split them (Gemini sometimes sends multiple bullets on one line)
|
|
52
|
+
this.buffer = this.buffer.replace(/([^\n])\s{2,}([•\-\*])\s+/g, '$1\n$2 ');
|
|
53
|
+
// Process complete lines
|
|
54
|
+
const lines = this.buffer.split('\n');
|
|
55
|
+
// Keep last incomplete line in buffer
|
|
56
|
+
if (!chunk.endsWith('\n')) {
|
|
57
|
+
this.buffer = lines.pop() || '';
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.buffer = '';
|
|
61
|
+
}
|
|
62
|
+
return lines.map(line => this.formatLine(line)).join('\n');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Flush any remaining buffered content
|
|
66
|
+
*/
|
|
67
|
+
flush() {
|
|
68
|
+
if (this.buffer) {
|
|
69
|
+
const formatted = this.formatLine(this.buffer);
|
|
70
|
+
this.buffer = '';
|
|
71
|
+
return formatted;
|
|
72
|
+
}
|
|
73
|
+
return '';
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Format a single line of markdown
|
|
77
|
+
*/
|
|
78
|
+
formatLine(line) {
|
|
79
|
+
// Check for code block delimiters
|
|
80
|
+
if (line.trim().startsWith('```')) {
|
|
81
|
+
if (!this.inCodeBlock) {
|
|
82
|
+
// Start of code block
|
|
83
|
+
this.inCodeBlock = true;
|
|
84
|
+
this.codeBlockLanguage = line.trim().substring(3).trim();
|
|
85
|
+
return this.theme.dimmed('─'.repeat(this.getCurrentWidth()));
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// End of code block
|
|
89
|
+
this.inCodeBlock = false;
|
|
90
|
+
this.codeBlockLanguage = '';
|
|
91
|
+
return this.theme.dimmed('─'.repeat(this.getCurrentWidth()));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Inside code block - apply code formatting
|
|
95
|
+
if (this.inCodeBlock) {
|
|
96
|
+
return this.formatCodeLine(line);
|
|
97
|
+
}
|
|
98
|
+
// Headers - all get consistent indent
|
|
99
|
+
if (line.startsWith('# ')) {
|
|
100
|
+
return '\n' + this.options.indent + chalk.bold(this.theme.colors.primary(line.substring(2))) + '\n';
|
|
101
|
+
}
|
|
102
|
+
if (line.startsWith('## ')) {
|
|
103
|
+
return '\n' + this.options.indent + chalk.bold(this.theme.colors.secondary(line.substring(3))) + '\n';
|
|
104
|
+
}
|
|
105
|
+
if (line.startsWith('### ')) {
|
|
106
|
+
return this.options.indent + chalk.bold(this.theme.colors.info(line.substring(4)));
|
|
107
|
+
}
|
|
108
|
+
if (line.startsWith('#### ')) {
|
|
109
|
+
return this.options.indent + chalk.bold(line.substring(5));
|
|
110
|
+
}
|
|
111
|
+
// Blockquotes - consistent indent
|
|
112
|
+
if (line.trim().startsWith('> ')) {
|
|
113
|
+
const content = line.trim().substring(2);
|
|
114
|
+
return this.options.indent + this.theme.dimmed('│ ') + this.theme.dimmed(content);
|
|
115
|
+
}
|
|
116
|
+
// Unordered lists - consistent indent
|
|
117
|
+
if (line.trim().match(/^[-*+]\s/)) {
|
|
118
|
+
// Remove bullet and ALL following whitespace, then trim
|
|
119
|
+
const content = line.trim().replace(/^[-*+]\s+/, '').trim();
|
|
120
|
+
const formatted = this.formatInline(content);
|
|
121
|
+
const bullet = this.theme.colors.info('• ');
|
|
122
|
+
const baseIndent = this.options.indent; // " "
|
|
123
|
+
const bulletIndent = baseIndent + ' '; // " " for continuation lines
|
|
124
|
+
// Wrap content accounting for bullet width
|
|
125
|
+
const wrapped = this.wrapText(formatted, this.getCurrentWidth(), bulletIndent);
|
|
126
|
+
const lines = wrapped.split('\n');
|
|
127
|
+
// First line gets base indent + bullet, rest get bullet indent
|
|
128
|
+
return lines.map((l, i) => (i === 0 ? baseIndent + bullet + l.substring(bulletIndent.length) : l)).join('\n');
|
|
129
|
+
}
|
|
130
|
+
// Ordered lists - consistent indent
|
|
131
|
+
const orderedMatch = line.trim().match(/^(\d+)\.\s+(.*)$/);
|
|
132
|
+
if (orderedMatch) {
|
|
133
|
+
const num = orderedMatch[1];
|
|
134
|
+
const content = orderedMatch[2]?.trim() || '';
|
|
135
|
+
const formatted = this.formatInline(content);
|
|
136
|
+
const prefix = this.theme.colors.info(`${num}. `);
|
|
137
|
+
const baseIndent = this.options.indent; // " "
|
|
138
|
+
const prefixIndent = baseIndent + ' '.repeat(num.length + 2); // " " or more for continuation
|
|
139
|
+
// Wrap content accounting for prefix width
|
|
140
|
+
const wrapped = this.wrapText(formatted, this.getCurrentWidth(), prefixIndent);
|
|
141
|
+
const lines = wrapped.split('\n');
|
|
142
|
+
// First line gets base indent + prefix, rest get prefix indent
|
|
143
|
+
return lines.map((l, i) => (i === 0 ? baseIndent + prefix + l.substring(prefixIndent.length) : l)).join('\n');
|
|
144
|
+
}
|
|
145
|
+
// Horizontal rules - no indent, full width
|
|
146
|
+
if (line.trim().match(/^[-*_]{3,}$/)) {
|
|
147
|
+
return this.theme.dimmed('─'.repeat(this.getCurrentWidth()));
|
|
148
|
+
}
|
|
149
|
+
// Regular text with inline formatting and word wrapping
|
|
150
|
+
const formatted = this.formatInline(line);
|
|
151
|
+
// Preserve empty lines
|
|
152
|
+
if (!line.trim()) {
|
|
153
|
+
return '';
|
|
154
|
+
}
|
|
155
|
+
// Indent regular text with 2 spaces (1 tab)
|
|
156
|
+
return this.wrapText(formatted, this.getCurrentWidth(), this.options.indent);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Format inline markdown elements
|
|
160
|
+
*/
|
|
161
|
+
formatInline(text) {
|
|
162
|
+
let result = text;
|
|
163
|
+
// Inline code: `code`
|
|
164
|
+
result = result.replace(/`([^`]+)`/g, (_, code) => {
|
|
165
|
+
return this.theme.function(code);
|
|
166
|
+
});
|
|
167
|
+
// Bold: **text** or __text__
|
|
168
|
+
result = result.replace(/\*\*([^*]+)\*\*/g, (_, text) => {
|
|
169
|
+
return chalk.bold(text);
|
|
170
|
+
});
|
|
171
|
+
result = result.replace(/__([^_]+)__/g, (_, text) => {
|
|
172
|
+
return chalk.bold(text);
|
|
173
|
+
});
|
|
174
|
+
// Italic: *text* or _text_ (but not inside words)
|
|
175
|
+
result = result.replace(/(?<!\w)\*([^*]+)\*(?!\w)/g, (_, text) => {
|
|
176
|
+
return chalk.italic(text);
|
|
177
|
+
});
|
|
178
|
+
result = result.replace(/(?<!\w)_([^_]+)_(?!\w)/g, (_, text) => {
|
|
179
|
+
return chalk.italic(text);
|
|
180
|
+
});
|
|
181
|
+
// Links: [text](url)
|
|
182
|
+
result = result.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_, text, url) => {
|
|
183
|
+
return this.theme.colors.info(text) + this.theme.dimmed(` (${url})`);
|
|
184
|
+
});
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Format a line inside a code block
|
|
189
|
+
*/
|
|
190
|
+
formatCodeLine(line) {
|
|
191
|
+
// Apply syntax highlighting if enabled
|
|
192
|
+
const formattedCode = this.options.syntaxHighlight && this.codeBlockLanguage
|
|
193
|
+
? this.highlightCode(line, this.codeBlockLanguage)
|
|
194
|
+
: this.theme.function(line);
|
|
195
|
+
// Add indentation to code blocks
|
|
196
|
+
return this.options.indent + formattedCode;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Apply basic syntax highlighting to code
|
|
200
|
+
*/
|
|
201
|
+
highlightCode(line, language) {
|
|
202
|
+
// Basic syntax highlighting for common languages
|
|
203
|
+
let result = line;
|
|
204
|
+
if (language === 'typescript' || language === 'javascript' || language === 'ts' || language === 'js') {
|
|
205
|
+
// Keywords
|
|
206
|
+
result = result.replace(/\b(const|let|var|function|class|interface|type|import|export|from|return|if|else|for|while|async|await|new|this|extends|implements)\b/g, match => this.theme.keyword(match));
|
|
207
|
+
// Strings
|
|
208
|
+
result = result.replace(/(["'`])(?:(?=(\\?))\2.)*?\1/g, match => this.theme.string(match));
|
|
209
|
+
// Numbers
|
|
210
|
+
result = result.replace(/\b\d+\b/g, match => this.theme.number(match));
|
|
211
|
+
// Comments
|
|
212
|
+
result = result.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/g, match => this.theme.comment(match));
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Wrap text at word boundaries
|
|
218
|
+
* Note: This strips ANSI codes for width calculation but preserves them in output
|
|
219
|
+
*/
|
|
220
|
+
wrapText(text, maxWidth, indent = '') {
|
|
221
|
+
// Strip ANSI codes for length calculation
|
|
222
|
+
const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*m/g, '');
|
|
223
|
+
// Account for indent width
|
|
224
|
+
const indentWidth = indent.length;
|
|
225
|
+
const effectiveMaxWidth = maxWidth - indentWidth;
|
|
226
|
+
if (stripAnsi(text).length <= effectiveMaxWidth) {
|
|
227
|
+
return indent + text;
|
|
228
|
+
}
|
|
229
|
+
const words = text.split(' ');
|
|
230
|
+
const lines = [];
|
|
231
|
+
let currentLine = '';
|
|
232
|
+
for (const word of words) {
|
|
233
|
+
const testLine = currentLine ? `${currentLine} ${word}` : word;
|
|
234
|
+
const testLineStripped = stripAnsi(testLine);
|
|
235
|
+
if (testLineStripped.length <= effectiveMaxWidth) {
|
|
236
|
+
currentLine = testLine;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
if (currentLine) {
|
|
240
|
+
lines.push(indent + currentLine);
|
|
241
|
+
}
|
|
242
|
+
// If single word is too long, just add it anyway (better than breaking)
|
|
243
|
+
currentLine = word;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (currentLine) {
|
|
247
|
+
lines.push(indent + currentLine);
|
|
248
|
+
}
|
|
249
|
+
return lines.join('\n');
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Reset renderer state
|
|
253
|
+
*/
|
|
254
|
+
reset() {
|
|
255
|
+
this.inCodeBlock = false;
|
|
256
|
+
this.codeBlockLanguage = '';
|
|
257
|
+
this.buffer = '';
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=MarkdownRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../src/utils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AK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC/D,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YAE7C,IAAI,gBAAgB,CAAC,MAAM,IAAI,iBAAiB,EAAE,CAAC;gBACjD,WAAW,GAAG,QAAQ,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,IAAI,WAAW,EAAE,CAAC;oBAChB,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;gBACnC,CAAC;gBACD,wEAAwE;gBACxE,WAAW,GAAG,IAAI,CAAC;YACrB,CAAC;QACH,CAAC;QAED,IAAI,WAAW,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessageRenderer - Renders conversational messages with copy-paste friendly formatting
|
|
3
|
+
*
|
|
4
|
+
* This utility provides consistent rendering for all message types in the CLI conversation
|
|
5
|
+
* interface. Uses color and emoji for visual distinction without boxes that break copy-paste.
|
|
6
|
+
*
|
|
7
|
+
* Design principles:
|
|
8
|
+
* - No boxes in conversation (color + emoji only)
|
|
9
|
+
* - Horizontal separators only (━) - don't interfere with copy
|
|
10
|
+
* - Leverages existing 13-theme system
|
|
11
|
+
* - Preserves copyability of all content
|
|
12
|
+
*
|
|
13
|
+
* @module MessageRenderer
|
|
14
|
+
*/
|
|
15
|
+
export interface ToolExecution {
|
|
16
|
+
name: string;
|
|
17
|
+
args?: any;
|
|
18
|
+
status: 'pending' | 'running' | 'success' | 'error';
|
|
19
|
+
result?: any;
|
|
20
|
+
error?: string;
|
|
21
|
+
duration?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DiffLine {
|
|
24
|
+
type: 'context' | 'added' | 'removed';
|
|
25
|
+
lineNumber?: number;
|
|
26
|
+
content: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* MessageRenderer - Copy-paste friendly message rendering
|
|
30
|
+
*
|
|
31
|
+
* Renders all conversation elements without boxes, using color and emoji
|
|
32
|
+
* for visual distinction. All output is designed to copy cleanly.
|
|
33
|
+
*/
|
|
34
|
+
export declare class MessageRenderer {
|
|
35
|
+
private theme;
|
|
36
|
+
private terminalWidth;
|
|
37
|
+
constructor();
|
|
38
|
+
/**
|
|
39
|
+
* Renders a user message with timestamp
|
|
40
|
+
*
|
|
41
|
+
* Format:
|
|
42
|
+
* > You (10:32 AM):
|
|
43
|
+
* Message content here
|
|
44
|
+
*
|
|
45
|
+
* @param content - The message text
|
|
46
|
+
* @param timestamp - Optional message timestamp
|
|
47
|
+
*/
|
|
48
|
+
renderUserMessage(content: string, timestamp?: Date): string;
|
|
49
|
+
/**
|
|
50
|
+
* Renders an assistant message with model name
|
|
51
|
+
*
|
|
52
|
+
* Format:
|
|
53
|
+
* ◆ Assistant (Grok 4 Fast):
|
|
54
|
+
* Response content here
|
|
55
|
+
*
|
|
56
|
+
* @param content - The response text
|
|
57
|
+
* @param model - Model name/ID
|
|
58
|
+
* @param timestamp - Optional message timestamp
|
|
59
|
+
*/
|
|
60
|
+
renderAssistantMessage(content: string, model: string, timestamp?: Date): string;
|
|
61
|
+
/**
|
|
62
|
+
* Renders thinking/reasoning blocks
|
|
63
|
+
*
|
|
64
|
+
* Collapsed format:
|
|
65
|
+
* ▸ Thinking... (collapsed)
|
|
66
|
+
*
|
|
67
|
+
* Expanded format:
|
|
68
|
+
* ▸ Thinking:
|
|
69
|
+
* Line 1 of thinking
|
|
70
|
+
* Line 2 of thinking
|
|
71
|
+
* Line 3 of thinking
|
|
72
|
+
*
|
|
73
|
+
* @param lines - Array of thinking lines
|
|
74
|
+
* @param collapsed - Whether to show collapsed view
|
|
75
|
+
*/
|
|
76
|
+
renderThinking(lines: string[], collapsed?: boolean): string;
|
|
77
|
+
/**
|
|
78
|
+
* Renders tool execution start
|
|
79
|
+
*
|
|
80
|
+
* Format:
|
|
81
|
+
* ▸ Running: Write(api/users.ts)
|
|
82
|
+
*
|
|
83
|
+
* @param tool - Tool execution details
|
|
84
|
+
*/
|
|
85
|
+
renderToolStart(tool: ToolExecution): string;
|
|
86
|
+
/**
|
|
87
|
+
* Renders tool execution success
|
|
88
|
+
*
|
|
89
|
+
* Format:
|
|
90
|
+
* ✓ Write(api/users.ts) - Created user routes (42 lines) (2.3s)
|
|
91
|
+
*
|
|
92
|
+
* @param tool - Tool execution details
|
|
93
|
+
*/
|
|
94
|
+
renderToolSuccess(tool: ToolExecution): string;
|
|
95
|
+
/**
|
|
96
|
+
* Renders tool execution error
|
|
97
|
+
*
|
|
98
|
+
* Format:
|
|
99
|
+
* ✗ Write(api/users.ts) - Error: File already exists (1.2s)
|
|
100
|
+
*
|
|
101
|
+
* @param tool - Tool execution details
|
|
102
|
+
*/
|
|
103
|
+
renderToolError(tool: ToolExecution): string;
|
|
104
|
+
/**
|
|
105
|
+
* Renders a list of tool executions with header
|
|
106
|
+
*
|
|
107
|
+
* Format:
|
|
108
|
+
* ▸ Tools:
|
|
109
|
+
* ✓ Write(api/users.ts) - Created (42 lines) (2.3s)
|
|
110
|
+
* ✓ Bash(npm install) - Installed (3.1s)
|
|
111
|
+
*
|
|
112
|
+
* @param tools - Array of tool executions
|
|
113
|
+
*/
|
|
114
|
+
renderToolList(tools: ToolExecution[]): string;
|
|
115
|
+
/**
|
|
116
|
+
* Renders a horizontal separator
|
|
117
|
+
*
|
|
118
|
+
* Format:
|
|
119
|
+
* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
+
*
|
|
121
|
+
* @param char - Character to repeat (default: ━)
|
|
122
|
+
* @param width - Width of separator (default: terminal width)
|
|
123
|
+
*/
|
|
124
|
+
renderSeparator(char?: string, width?: number): string;
|
|
125
|
+
/**
|
|
126
|
+
* Renders a section header
|
|
127
|
+
*
|
|
128
|
+
* Format:
|
|
129
|
+
* ━━━ Session Info ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
130
|
+
*
|
|
131
|
+
* @param title - Section title
|
|
132
|
+
*/
|
|
133
|
+
renderSectionHeader(title: string): string;
|
|
134
|
+
/**
|
|
135
|
+
* Renders an error message
|
|
136
|
+
*
|
|
137
|
+
* Format:
|
|
138
|
+
* ✗ Error: Connection timeout
|
|
139
|
+
*
|
|
140
|
+
* @param message - Error message
|
|
141
|
+
*/
|
|
142
|
+
renderError(message: string): string;
|
|
143
|
+
/**
|
|
144
|
+
* Renders a success message
|
|
145
|
+
*
|
|
146
|
+
* Format:
|
|
147
|
+
* ✓ Session saved successfully
|
|
148
|
+
*
|
|
149
|
+
* @param message - Success message
|
|
150
|
+
*/
|
|
151
|
+
renderSuccess(message: string): string;
|
|
152
|
+
/**
|
|
153
|
+
* Renders a warning message
|
|
154
|
+
*
|
|
155
|
+
* Format:
|
|
156
|
+
* ⚠ Model switching mid-session may affect context
|
|
157
|
+
*
|
|
158
|
+
* @param message - Warning message
|
|
159
|
+
*/
|
|
160
|
+
renderWarning(message: string): string;
|
|
161
|
+
/**
|
|
162
|
+
* Renders an info message
|
|
163
|
+
*
|
|
164
|
+
* Format:
|
|
165
|
+
* ℹ Using cached response
|
|
166
|
+
*
|
|
167
|
+
* @param message - Info message
|
|
168
|
+
*/
|
|
169
|
+
renderInfo(message: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* Renders input prompt
|
|
172
|
+
*
|
|
173
|
+
* Format:
|
|
174
|
+
* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
|
+
* > You: _
|
|
176
|
+
* [i] Try "/" for commands | Ctrl+C to exit
|
|
177
|
+
*
|
|
178
|
+
* @param placeholder - Optional placeholder text
|
|
179
|
+
*/
|
|
180
|
+
renderInputPrompt(placeholder?: string): string;
|
|
181
|
+
/**
|
|
182
|
+
* Renders a progress indicator
|
|
183
|
+
*
|
|
184
|
+
* Format:
|
|
185
|
+
* ... Processing... [████████░░░░░░░░░░] 40%
|
|
186
|
+
*
|
|
187
|
+
* @param message - Progress message
|
|
188
|
+
* @param percent - Progress percentage (0-100)
|
|
189
|
+
*/
|
|
190
|
+
renderProgress(message: string, percent: number): string;
|
|
191
|
+
/**
|
|
192
|
+
* Refreshes theme (call after theme change)
|
|
193
|
+
*/
|
|
194
|
+
refreshTheme(): void;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Default singleton instance
|
|
198
|
+
*/
|
|
199
|
+
export declare const messageRenderer: MessageRenderer;
|
|
200
|
+
//# sourceMappingURL=MessageRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../src/utils/MessageRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACpD,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtC,UAAU,CAAC,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