@defai.digital/ax-cli 2.7.0 â 3.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/.ax-cli/checkpoints/2025-11-20/checkpoint-2dd84869-e62d-46c8-9885-7e45f37f36e2.json +69 -0
- package/.ax-cli/checkpoints/2025-11-20/checkpoint-484dc350-353f-4808-9ed1-ebb3cefdab37.json +24 -0
- package/.ax-cli/checkpoints/2025-11-20/checkpoint-74a18b87-6172-4215-962b-44bb9f46a662.json +69 -0
- package/.ax-cli/checkpoints/2025-11-20/checkpoint-870a5fb9-6e82-4ff2-8ec8-af4c251cc514.json +44 -0
- package/.ax-cli/checkpoints/2025-11-20/checkpoint-93946601-0e83-456c-ba47-def9713124dd.json +24 -0
- package/.ax-cli/checkpoints/metadata.json +62 -0
- package/README.md +87 -11
- package/dist/agent/context-manager.d.ts +2 -2
- package/dist/agent/context-manager.js +37 -15
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/dependency-resolver.d.ts +83 -0
- package/dist/agent/dependency-resolver.js +310 -0
- package/dist/agent/dependency-resolver.js.map +1 -0
- package/dist/agent/llm-agent.d.ts +111 -0
- package/dist/agent/llm-agent.js +625 -3
- package/dist/agent/llm-agent.js.map +1 -1
- package/dist/agent/specialized/analysis-agent.d.ts +11 -0
- package/dist/agent/specialized/analysis-agent.js +33 -0
- package/dist/agent/specialized/analysis-agent.js.map +1 -0
- package/dist/agent/specialized/debug-agent.d.ts +11 -0
- package/dist/agent/specialized/debug-agent.js +33 -0
- package/dist/agent/specialized/debug-agent.js.map +1 -0
- package/dist/agent/specialized/documentation-agent.d.ts +11 -0
- package/dist/agent/specialized/documentation-agent.js +33 -0
- package/dist/agent/specialized/documentation-agent.js.map +1 -0
- package/dist/agent/specialized/index.d.ts +11 -0
- package/dist/agent/specialized/index.js +12 -0
- package/dist/agent/specialized/index.js.map +1 -0
- package/dist/agent/specialized/performance-agent.d.ts +11 -0
- package/dist/agent/specialized/performance-agent.js +33 -0
- package/dist/agent/specialized/performance-agent.js.map +1 -0
- package/dist/agent/specialized/refactoring-agent.d.ts +11 -0
- package/dist/agent/specialized/refactoring-agent.js +33 -0
- package/dist/agent/specialized/refactoring-agent.js.map +1 -0
- package/dist/agent/specialized/testing-agent.d.ts +11 -0
- package/dist/agent/specialized/testing-agent.js +33 -0
- package/dist/agent/specialized/testing-agent.js.map +1 -0
- package/dist/agent/subagent-orchestrator.d.ts +128 -0
- package/dist/agent/subagent-orchestrator.js +388 -0
- package/dist/agent/subagent-orchestrator.js.map +1 -0
- package/dist/agent/subagent-types.d.ts +262 -0
- package/dist/agent/subagent-types.js +152 -0
- package/dist/agent/subagent-types.js.map +1 -0
- package/dist/agent/subagent.d.ts +88 -0
- package/dist/agent/subagent.js +426 -0
- package/dist/agent/subagent.js.map +1 -0
- package/dist/checkpoint/index.d.ts +9 -0
- package/dist/checkpoint/index.js +11 -0
- package/dist/checkpoint/index.js.map +1 -0
- package/dist/checkpoint/manager.d.ts +99 -0
- package/dist/checkpoint/manager.js +281 -0
- package/dist/checkpoint/manager.js.map +1 -0
- package/dist/checkpoint/storage.d.ts +31 -0
- package/dist/checkpoint/storage.js +265 -0
- package/dist/checkpoint/storage.js.map +1 -0
- package/dist/checkpoint/types.d.ts +111 -0
- package/dist/checkpoint/types.js +17 -0
- package/dist/checkpoint/types.js.map +1 -0
- package/dist/commands/cache.js +5 -3
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/memory.js +21 -16
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/plan.d.ts +43 -0
- package/dist/commands/plan.js +385 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/rewind.d.ts +19 -0
- package/dist/commands/rewind.js +221 -0
- package/dist/commands/rewind.js.map +1 -0
- package/dist/constants.d.ts +28 -0
- package/dist/constants.js +29 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/use-enhanced-input.d.ts +5 -1
- package/dist/hooks/use-enhanced-input.js +23 -10
- package/dist/hooks/use-enhanced-input.js.map +1 -1
- package/dist/hooks/use-input-handler.d.ts +11 -1
- package/dist/hooks/use-input-handler.js +294 -2
- package/dist/hooks/use-input-handler.js.map +1 -1
- package/dist/llm/client.js +2 -1
- package/dist/llm/client.js.map +1 -1
- package/dist/llm/tools.d.ts +5 -0
- package/dist/llm/tools.js +57 -6
- package/dist/llm/tools.js.map +1 -1
- package/dist/mcp/client.d.ts +1 -0
- package/dist/mcp/client.js +30 -8
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/transports.d.ts +0 -1
- package/dist/mcp/transports.js +10 -7
- package/dist/mcp/transports.js.map +1 -1
- package/dist/planner/dependency-resolver.d.ts +72 -0
- package/dist/planner/dependency-resolver.js +272 -0
- package/dist/planner/dependency-resolver.js.map +1 -0
- package/dist/planner/index.d.ts +12 -0
- package/dist/planner/index.js +26 -0
- package/dist/planner/index.js.map +1 -0
- package/dist/planner/plan-generator.d.ts +74 -0
- package/dist/planner/plan-generator.js +244 -0
- package/dist/planner/plan-generator.js.map +1 -0
- package/dist/planner/plan-storage.d.ts +98 -0
- package/dist/planner/plan-storage.js +325 -0
- package/dist/planner/plan-storage.js.map +1 -0
- package/dist/planner/prompts/planning-prompt.d.ts +41 -0
- package/dist/planner/prompts/planning-prompt.js +289 -0
- package/dist/planner/prompts/planning-prompt.js.map +1 -0
- package/dist/planner/task-planner.d.ts +135 -0
- package/dist/planner/task-planner.js +493 -0
- package/dist/planner/task-planner.js.map +1 -0
- package/dist/planner/token-estimator.d.ts +63 -0
- package/dist/planner/token-estimator.js +295 -0
- package/dist/planner/token-estimator.js.map +1 -0
- package/dist/planner/types.d.ts +669 -0
- package/dist/planner/types.js +213 -0
- package/dist/planner/types.js.map +1 -0
- package/dist/schemas/api-schemas.js +4 -0
- package/dist/schemas/api-schemas.js.map +1 -1
- package/dist/schemas/confirmation-schemas.d.ts +5 -0
- package/dist/schemas/confirmation-schemas.js +7 -0
- package/dist/schemas/confirmation-schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +4 -4
- package/dist/tools/bash-output.d.ts +25 -0
- package/dist/tools/bash-output.js +145 -0
- package/dist/tools/bash-output.js.map +1 -0
- package/dist/tools/bash.d.ts +46 -2
- package/dist/tools/bash.js +241 -42
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/search.js +34 -9
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/text-editor.d.ts +16 -0
- package/dist/tools/text-editor.js +37 -2
- package/dist/tools/text-editor.js.map +1 -1
- package/dist/ui/components/chat-history.d.ts +1 -0
- package/dist/ui/components/chat-history.js +125 -41
- package/dist/ui/components/chat-history.js.map +1 -1
- package/dist/ui/components/chat-input.js +10 -3
- package/dist/ui/components/chat-input.js.map +1 -1
- package/dist/ui/components/chat-interface.js +154 -45
- package/dist/ui/components/chat-interface.js.map +1 -1
- package/dist/ui/components/collapsible-tool-result.d.ts +26 -0
- package/dist/ui/components/collapsible-tool-result.js +172 -0
- package/dist/ui/components/collapsible-tool-result.js.map +1 -0
- package/dist/ui/components/command-suggestions.js +2 -1
- package/dist/ui/components/command-suggestions.js.map +1 -1
- package/dist/ui/components/confirmation-dialog.js +25 -36
- package/dist/ui/components/confirmation-dialog.js.map +1 -1
- package/dist/ui/components/index.d.ts +8 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -1
- package/dist/ui/components/keyboard-hints.d.ts +35 -0
- package/dist/ui/components/keyboard-hints.js +134 -0
- package/dist/ui/components/keyboard-hints.js.map +1 -0
- package/dist/ui/components/loading-spinner.d.ts +2 -1
- package/dist/ui/components/loading-spinner.js +86 -34
- package/dist/ui/components/loading-spinner.js.map +1 -1
- package/dist/ui/components/phase-progress.d.ts +21 -0
- package/dist/ui/components/phase-progress.js +228 -0
- package/dist/ui/components/phase-progress.js.map +1 -0
- package/dist/ui/components/quick-actions.d.ts +12 -0
- package/dist/ui/components/quick-actions.js +122 -0
- package/dist/ui/components/quick-actions.js.map +1 -0
- package/dist/ui/components/reasoning-display.d.ts +0 -80
- package/dist/ui/components/reasoning-display.js +0 -83
- package/dist/ui/components/reasoning-display.js.map +1 -1
- package/dist/ui/components/status-bar.d.ts +25 -0
- package/dist/ui/components/status-bar.js +125 -0
- package/dist/ui/components/status-bar.js.map +1 -0
- package/dist/ui/components/subagent-monitor.d.ts +29 -0
- package/dist/ui/components/subagent-monitor.js +150 -0
- package/dist/ui/components/subagent-monitor.js.map +1 -0
- package/dist/ui/components/toast-notification.d.ts +123 -0
- package/dist/ui/components/toast-notification.js +143 -0
- package/dist/ui/components/toast-notification.js.map +1 -0
- package/dist/ui/components/welcome-panel.d.ts +10 -0
- package/dist/ui/components/welcome-panel.js +107 -0
- package/dist/ui/components/welcome-panel.js.map +1 -0
- package/dist/utils/background-task-manager.d.ts +95 -0
- package/dist/utils/background-task-manager.js +330 -0
- package/dist/utils/background-task-manager.js.map +1 -0
- package/dist/utils/confirmation-service.js +8 -3
- package/dist/utils/confirmation-service.js.map +1 -1
- package/dist/utils/history-manager.d.ts +1 -0
- package/dist/utils/history-manager.js +40 -5
- package/dist/utils/history-manager.js.map +1 -1
- package/dist/utils/json-utils.d.ts +7 -0
- package/dist/utils/json-utils.js +70 -2
- package/dist/utils/json-utils.js.map +1 -1
- package/dist/utils/message-optimizer.d.ts +1 -0
- package/dist/utils/message-optimizer.js +7 -1
- package/dist/utils/message-optimizer.js.map +1 -1
- package/dist/utils/project-analyzer.js +5 -2
- package/dist/utils/project-analyzer.js.map +1 -1
- package/dist/utils/settings-manager.js +12 -10
- package/dist/utils/settings-manager.js.map +1 -1
- package/dist/utils/text-utils.js +3 -3
- package/dist/utils/text-utils.js.map +1 -1
- package/dist/utils/token-counter.d.ts +5 -0
- package/dist/utils/token-counter.js +18 -3
- package/dist/utils/token-counter.js.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Status Bar Component
|
|
3
|
+
* Professional, scannable status display with visual context indicator
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Box, Text } from "ink";
|
|
7
|
+
/**
|
|
8
|
+
* Get accessibility symbol for context status
|
|
9
|
+
* Provides visual indicator for colorblind users
|
|
10
|
+
*/
|
|
11
|
+
function getStatusSymbol(percentage) {
|
|
12
|
+
if (percentage > 50)
|
|
13
|
+
return "â"; // Healthy - plenty of context remaining
|
|
14
|
+
if (percentage > 25)
|
|
15
|
+
return "â "; // Warning - context getting low
|
|
16
|
+
return "â"; // Critical - context nearly exhausted
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Renders a visual progress bar for context usage
|
|
20
|
+
* Uses block characters for smooth visualization
|
|
21
|
+
* Includes accessibility symbols for colorblind users
|
|
22
|
+
*/
|
|
23
|
+
function ContextBar({ percentage, showAutoPrune }) {
|
|
24
|
+
const barWidth = 15;
|
|
25
|
+
const filledWidth = Math.round((percentage / 100) * barWidth);
|
|
26
|
+
const emptyWidth = barWidth - filledWidth;
|
|
27
|
+
// Color based on remaining context (inverted - high % = more remaining = good)
|
|
28
|
+
const getColor = () => {
|
|
29
|
+
if (percentage > 50)
|
|
30
|
+
return "green";
|
|
31
|
+
if (percentage > 25)
|
|
32
|
+
return "yellow";
|
|
33
|
+
return "red";
|
|
34
|
+
};
|
|
35
|
+
// Warning message when context is getting low (85%+ used = 15% remaining)
|
|
36
|
+
const showWarning = percentage <= 15;
|
|
37
|
+
if (showAutoPrune) {
|
|
38
|
+
return (React.createElement(Box, null,
|
|
39
|
+
React.createElement(Text, { color: "cyan", bold: true }, "\u21BB auto-pruned")));
|
|
40
|
+
}
|
|
41
|
+
return (React.createElement(Box, null,
|
|
42
|
+
React.createElement(Text, { color: getColor() }, "â".repeat(filledWidth)),
|
|
43
|
+
React.createElement(Text, { color: "gray", dimColor: true }, "â".repeat(emptyWidth)),
|
|
44
|
+
React.createElement(Text, { color: getColor() },
|
|
45
|
+
" ",
|
|
46
|
+
getStatusSymbol(percentage),
|
|
47
|
+
" ",
|
|
48
|
+
percentage.toFixed(0),
|
|
49
|
+
"%"),
|
|
50
|
+
showWarning && (React.createElement(Text, { color: "red", bold: true }, " LOW!"))));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Mode indicator pill component
|
|
54
|
+
* Uses bright colors when enabled for better visibility
|
|
55
|
+
* Supports flash animation on toggle
|
|
56
|
+
*/
|
|
57
|
+
function ModePill({ label, enabled, shortcut, enabledColor = "cyan", flash = false, }) {
|
|
58
|
+
// Flash effect: briefly highlight when toggled
|
|
59
|
+
const displayColor = flash ? "white" : enabled ? enabledColor : "gray";
|
|
60
|
+
const isBold = flash || enabled;
|
|
61
|
+
return (React.createElement(Box, { marginRight: 2 },
|
|
62
|
+
enabled ? (React.createElement(React.Fragment, null,
|
|
63
|
+
React.createElement(Text, { color: displayColor, bold: isBold }, "\u25CF"),
|
|
64
|
+
React.createElement(Text, { color: displayColor, bold: flash },
|
|
65
|
+
" ",
|
|
66
|
+
label))) : (React.createElement(Text, { color: displayColor, bold: flash },
|
|
67
|
+
"\u25CB ",
|
|
68
|
+
label)),
|
|
69
|
+
React.createElement(Text, { color: "gray", dimColor: true },
|
|
70
|
+
" ",
|
|
71
|
+
"(",
|
|
72
|
+
shortcut,
|
|
73
|
+
")")));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Format token count for display
|
|
77
|
+
*/
|
|
78
|
+
function formatTokens(count) {
|
|
79
|
+
if (count >= 1000000)
|
|
80
|
+
return `${(count / 1000000).toFixed(1)}M`;
|
|
81
|
+
if (count >= 1000)
|
|
82
|
+
return `${(count / 1000).toFixed(1)}k`;
|
|
83
|
+
return count.toString();
|
|
84
|
+
}
|
|
85
|
+
export function StatusBar({ projectName, version, model, contextPercentage, showAutoPrune, autoEditEnabled, verboseMode, backgroundMode = false, mcpServerCount = 0, backgroundTaskCount = 0, isProcessing = false, tokenCount = 0, flashAutoEdit = false, flashVerbose = false, flashBackground = false, }) {
|
|
86
|
+
return (React.createElement(Box, { flexDirection: "column", marginTop: 1 },
|
|
87
|
+
React.createElement(Box, { borderStyle: "single", borderColor: isProcessing ? "yellow" : "gray", paddingX: 1, flexDirection: "row", justifyContent: "space-between" },
|
|
88
|
+
React.createElement(Box, null,
|
|
89
|
+
React.createElement(Text, { color: "magenta", bold: true }, projectName),
|
|
90
|
+
React.createElement(Text, { color: "gray" }, " \u2022 "),
|
|
91
|
+
React.createElement(Text, { color: "white", bold: true }, "ax"),
|
|
92
|
+
React.createElement(Text, { color: "greenBright", bold: true },
|
|
93
|
+
" v",
|
|
94
|
+
version)),
|
|
95
|
+
React.createElement(Box, null,
|
|
96
|
+
React.createElement(Text, { color: "gray" }, "\uD83E\uDD16 "),
|
|
97
|
+
React.createElement(Text, { color: "yellow" }, model),
|
|
98
|
+
isProcessing && tokenCount > 0 && (React.createElement(Text, { color: "cyan" },
|
|
99
|
+
" (",
|
|
100
|
+
formatTokens(tokenCount),
|
|
101
|
+
" tokens)"))),
|
|
102
|
+
React.createElement(Box, null,
|
|
103
|
+
React.createElement(Text, { color: "gray" }, "ctx remaining: "),
|
|
104
|
+
React.createElement(ContextBar, { percentage: contextPercentage, showAutoPrune: showAutoPrune }),
|
|
105
|
+
backgroundTaskCount > 0 && (React.createElement(React.Fragment, null,
|
|
106
|
+
React.createElement(Text, { color: "gray" }, " \u2022 "),
|
|
107
|
+
React.createElement(Text, { color: "yellow" },
|
|
108
|
+
"\uD83D\uDCE6 ",
|
|
109
|
+
backgroundTaskCount,
|
|
110
|
+
" running"),
|
|
111
|
+
React.createElement(Text, { color: "gray", dimColor: true }, " (/tasks)"))),
|
|
112
|
+
mcpServerCount > 0 && (React.createElement(React.Fragment, null,
|
|
113
|
+
React.createElement(Text, { color: "gray" }, " \u2022 "),
|
|
114
|
+
React.createElement(Text, { color: "blue" },
|
|
115
|
+
"MCP: ",
|
|
116
|
+
mcpServerCount))))),
|
|
117
|
+
React.createElement(Box, { marginTop: 0, paddingX: 1 },
|
|
118
|
+
React.createElement(ModePill, { label: "auto-edit", enabled: autoEditEnabled, shortcut: "\u21E7\u21E5", enabledColor: "green", flash: flashAutoEdit }),
|
|
119
|
+
React.createElement(ModePill, { label: "verbose", enabled: verboseMode, shortcut: "^O", enabledColor: "yellow", flash: flashVerbose }),
|
|
120
|
+
React.createElement(ModePill, { label: "bg-mode", enabled: backgroundMode, shortcut: "^B", enabledColor: "magenta", flash: flashBackground }),
|
|
121
|
+
!isProcessing && (React.createElement(Box, { marginLeft: 1 },
|
|
122
|
+
React.createElement(Text, { color: "gray", dimColor: true }, "\u2022 ^K quick actions \u2022 /help commands"))))));
|
|
123
|
+
}
|
|
124
|
+
export default StatusBar;
|
|
125
|
+
//# sourceMappingURL=status-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-bar.js","sourceRoot":"","sources":["../../../src/ui/components/status-bar.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAsBhC;;;GAGG;AACH,SAAS,eAAe,CAAC,UAAkB;IACzC,IAAI,UAAU,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,CAAE,wCAAwC;IAC1E,IAAI,UAAU,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,CAAE,gCAAgC;IAClE,OAAO,GAAG,CAAC,CAAE,sCAAsC;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,EAAE,UAAU,EAAE,aAAa,EAAkD;IAC/F,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;IAE1C,+EAA+E;IAC/E,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,IAAI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BAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;YAC5B,oBAAC,QAAQ,IACP,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAC,cAAI,EACb,YAAY,EAAC,OAAO,EACpB,KAAK,EAAE,aAAa,GACpB;YACF,oBAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAC,IAAI,EACb,YAAY,EAAC,QAAQ,EACrB,KAAK,EAAE,YAAY,GACnB;YACF,oBAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAC,IAAI,EACb,YAAY,EAAC,SAAS,EACtB,KAAK,EAAE,eAAe,GACtB;YAED,CAAC,YAAY,IAAI,CAChB,oBAAC,GAAG,IAAC,UAAU,EAAE,CAAC;gBAChB,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,0DAEpB,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subagent Monitor Component
|
|
3
|
+
*
|
|
4
|
+
* Displays active subagents and their execution status in the terminal UI.
|
|
5
|
+
* Shows parallel execution progress with spinners and status indicators.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { SubagentResult, SubagentStatus } from '../../agent/subagent-types.js';
|
|
9
|
+
interface SubagentMonitorProps {
|
|
10
|
+
/** Currently active subagents */
|
|
11
|
+
activeSubagents: SubagentStatus[];
|
|
12
|
+
/** Completed subagent results */
|
|
13
|
+
results: SubagentResult[];
|
|
14
|
+
/** Show detailed progress information */
|
|
15
|
+
verbose?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* SubagentMonitor component for visualizing subagent execution
|
|
19
|
+
*/
|
|
20
|
+
export declare const SubagentMonitor: React.FC<SubagentMonitorProps>;
|
|
21
|
+
/**
|
|
22
|
+
* Compact version for status bar
|
|
23
|
+
*/
|
|
24
|
+
export declare const SubagentStatusBar: React.FC<{
|
|
25
|
+
activeCount: number;
|
|
26
|
+
completedCount: number;
|
|
27
|
+
failedCount: number;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subagent Monitor Component
|
|
3
|
+
*
|
|
4
|
+
* Displays active subagents and their execution status in the terminal UI.
|
|
5
|
+
* Shows parallel execution progress with spinners and status indicators.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Box, Text } from 'ink';
|
|
9
|
+
import Spinner from 'ink-spinner';
|
|
10
|
+
import { SubagentState } from '../../agent/subagent-types.js';
|
|
11
|
+
/**
|
|
12
|
+
* SubagentMonitor component for visualizing subagent execution
|
|
13
|
+
*/
|
|
14
|
+
export const SubagentMonitor = ({ activeSubagents, results, verbose = false, }) => {
|
|
15
|
+
if (activeSubagents.length === 0 && results.length === 0) {
|
|
16
|
+
return null; // Don't render if nothing to show
|
|
17
|
+
}
|
|
18
|
+
const getStateIcon = (state) => {
|
|
19
|
+
switch (state) {
|
|
20
|
+
case SubagentState.PENDING:
|
|
21
|
+
return 'â¸ī¸';
|
|
22
|
+
case SubagentState.RUNNING:
|
|
23
|
+
return 'âļī¸';
|
|
24
|
+
case SubagentState.COMPLETED:
|
|
25
|
+
return 'â
';
|
|
26
|
+
case SubagentState.FAILED:
|
|
27
|
+
return 'â';
|
|
28
|
+
case SubagentState.CANCELLED:
|
|
29
|
+
return 'đĢ';
|
|
30
|
+
default:
|
|
31
|
+
return 'â';
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const formatDuration = (ms) => {
|
|
35
|
+
if (ms < 1000) {
|
|
36
|
+
return `${ms}ms`;
|
|
37
|
+
}
|
|
38
|
+
else if (ms < 60000) {
|
|
39
|
+
return `${(ms / 1000).toFixed(1)}s`;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return `${(ms / 60000).toFixed(1)}m`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const getProgressBar = (progress, width = 20) => {
|
|
46
|
+
const filled = Math.round((progress / 100) * width);
|
|
47
|
+
const empty = width - filled;
|
|
48
|
+
return 'â'.repeat(filled) + 'â'.repeat(empty);
|
|
49
|
+
};
|
|
50
|
+
return (React.createElement(Box, { flexDirection: "column", marginY: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1 },
|
|
51
|
+
React.createElement(Box, { marginBottom: 1 },
|
|
52
|
+
React.createElement(Text, { bold: true, color: "cyan" }, "\uD83E\uDD16 Subagent System")),
|
|
53
|
+
activeSubagents.length > 0 && (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
54
|
+
React.createElement(Text, { bold: true, color: "yellow" },
|
|
55
|
+
"Active (",
|
|
56
|
+
activeSubagents.length,
|
|
57
|
+
"):"),
|
|
58
|
+
activeSubagents.map((subagent, _index) => (React.createElement(Box, { key: subagent.id, marginLeft: 2, flexDirection: "column" },
|
|
59
|
+
React.createElement(Box, null,
|
|
60
|
+
React.createElement(Text, { color: "cyan" },
|
|
61
|
+
subagent.state === SubagentState.RUNNING && React.createElement(Spinner, { type: "dots" }),
|
|
62
|
+
' ',
|
|
63
|
+
getStateIcon(subagent.state),
|
|
64
|
+
" ",
|
|
65
|
+
subagent.role,
|
|
66
|
+
verbose && ` (${subagent.id.slice(0, 8)})`)),
|
|
67
|
+
verbose && subagent.currentAction && (React.createElement(Box, { marginLeft: 2 },
|
|
68
|
+
React.createElement(Text, { dimColor: true },
|
|
69
|
+
"\u2192 ",
|
|
70
|
+
subagent.currentAction))),
|
|
71
|
+
subagent.progress > 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
72
|
+
React.createElement(Text, { dimColor: true },
|
|
73
|
+
getProgressBar(subagent.progress),
|
|
74
|
+
" ",
|
|
75
|
+
subagent.progress,
|
|
76
|
+
"%"))),
|
|
77
|
+
verbose && subagent.toolsUsed && subagent.toolsUsed.length > 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
78
|
+
React.createElement(Text, { dimColor: true },
|
|
79
|
+
"Tools: ",
|
|
80
|
+
subagent.toolsUsed.join(', ')))),
|
|
81
|
+
verbose && subagent.toolRoundsUsed !== undefined && (React.createElement(Box, { marginLeft: 2 },
|
|
82
|
+
React.createElement(Text, { dimColor: true },
|
|
83
|
+
"Rounds: ",
|
|
84
|
+
subagent.toolRoundsUsed)))))))),
|
|
85
|
+
results.length > 0 && (React.createElement(Box, { flexDirection: "column" },
|
|
86
|
+
React.createElement(Text, { bold: true, color: "green" },
|
|
87
|
+
"Completed (",
|
|
88
|
+
results.length,
|
|
89
|
+
"):"),
|
|
90
|
+
results.map((result, _index) => (React.createElement(Box, { key: result.id, marginLeft: 2, flexDirection: "column" },
|
|
91
|
+
React.createElement(Box, null,
|
|
92
|
+
React.createElement(Text, { color: result.success ? 'green' : 'red' },
|
|
93
|
+
result.success ? 'â
' : 'â',
|
|
94
|
+
" ",
|
|
95
|
+
result.role,
|
|
96
|
+
verbose && ` (${result.id.slice(0, 8)})`),
|
|
97
|
+
React.createElement(Text, { dimColor: true },
|
|
98
|
+
" - ",
|
|
99
|
+
formatDuration(result.executionTime))),
|
|
100
|
+
result.error && (React.createElement(Box, { marginLeft: 2 },
|
|
101
|
+
React.createElement(Text, { color: "red" },
|
|
102
|
+
"Error: ",
|
|
103
|
+
result.error))),
|
|
104
|
+
verbose && result.filesModified && result.filesModified.length > 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
105
|
+
React.createElement(Text, { dimColor: true },
|
|
106
|
+
"Modified: ",
|
|
107
|
+
result.filesModified.length,
|
|
108
|
+
" file(s)"))),
|
|
109
|
+
verbose && result.filesCreated && result.filesCreated.length > 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
110
|
+
React.createElement(Text, { dimColor: true },
|
|
111
|
+
"Created: ",
|
|
112
|
+
result.filesCreated.length,
|
|
113
|
+
" file(s)"))),
|
|
114
|
+
verbose && result.toolCalls && result.toolCalls.length > 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
115
|
+
React.createElement(Text, { dimColor: true },
|
|
116
|
+
"Tool calls: ",
|
|
117
|
+
result.toolCalls.length)))))))),
|
|
118
|
+
results.length > 0 && (React.createElement(Box, { marginTop: 1, borderStyle: "single", borderColor: "gray", paddingX: 1 },
|
|
119
|
+
React.createElement(Text, { dimColor: true },
|
|
120
|
+
"Success rate: ",
|
|
121
|
+
results.filter(r => r.success).length,
|
|
122
|
+
"/",
|
|
123
|
+
results.length,
|
|
124
|
+
' | ',
|
|
125
|
+
"Total time: ",
|
|
126
|
+
formatDuration(results.reduce((sum, r) => sum + r.executionTime, 0)))))));
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Compact version for status bar
|
|
130
|
+
*/
|
|
131
|
+
export const SubagentStatusBar = ({ activeCount, completedCount, failedCount }) => {
|
|
132
|
+
if (activeCount === 0 && completedCount === 0 && failedCount === 0) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return (React.createElement(Box, null,
|
|
136
|
+
React.createElement(Text, { dimColor: true }, "Subagents:"),
|
|
137
|
+
activeCount > 0 && (React.createElement(Text, { color: "yellow" },
|
|
138
|
+
" ",
|
|
139
|
+
activeCount,
|
|
140
|
+
" active")),
|
|
141
|
+
completedCount > 0 && (React.createElement(Text, { color: "green" },
|
|
142
|
+
" ",
|
|
143
|
+
completedCount,
|
|
144
|
+
" done")),
|
|
145
|
+
failedCount > 0 && (React.createElement(Text, { color: "red" },
|
|
146
|
+
" ",
|
|
147
|
+
failedCount,
|
|
148
|
+
" failed"))));
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=subagent-monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-monitor.js","sourceRoot":"","sources":["../../../src/ui/components/subagent-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EAAC,KAAK;;YAAG,WAAW;sBAAe,CAC/C,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Notification Component
|
|
3
|
+
* Brief, auto-dismissing notifications for user feedback
|
|
4
|
+
*
|
|
5
|
+
* Used for mode toggles (Ctrl+B, Ctrl+O) and other transient feedback
|
|
6
|
+
* that shouldn't pollute chat history.
|
|
7
|
+
*/
|
|
8
|
+
import React from "react";
|
|
9
|
+
export interface ToastMessage {
|
|
10
|
+
id: string;
|
|
11
|
+
message: string;
|
|
12
|
+
type: "success" | "info" | "warning" | "error";
|
|
13
|
+
icon?: string;
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
16
|
+
interface ToastNotificationProps {
|
|
17
|
+
toast: ToastMessage | null;
|
|
18
|
+
onDismiss?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Single Toast Component
|
|
22
|
+
*/
|
|
23
|
+
export declare function ToastNotification({ toast, onDismiss }: ToastNotificationProps): React.JSX.Element | null;
|
|
24
|
+
/**
|
|
25
|
+
* Toast Container - manages multiple toasts with queue
|
|
26
|
+
*/
|
|
27
|
+
interface ToastContainerProps {
|
|
28
|
+
toasts: ToastMessage[];
|
|
29
|
+
onDismiss: (id: string) => void;
|
|
30
|
+
maxVisible?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function ToastContainer({ toasts, onDismiss, maxVisible }: ToastContainerProps): React.JSX.Element | null;
|
|
33
|
+
/**
|
|
34
|
+
* Hook for managing toast state
|
|
35
|
+
*/
|
|
36
|
+
export declare function useToasts(): {
|
|
37
|
+
toasts: ToastMessage[];
|
|
38
|
+
addToast: (toast: Omit<ToastMessage, "id">) => string;
|
|
39
|
+
removeToast: (id: string) => void;
|
|
40
|
+
clearToasts: () => void;
|
|
41
|
+
success: (message: string, icon?: string, duration?: number) => string;
|
|
42
|
+
info: (message: string, icon?: string, duration?: number) => string;
|
|
43
|
+
warning: (message: string, icon?: string, duration?: number) => string;
|
|
44
|
+
error: (message: string, icon?: string, duration?: number) => string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Pre-defined toast messages for common actions
|
|
48
|
+
*/
|
|
49
|
+
export declare const TOAST_MESSAGES: {
|
|
50
|
+
verboseOn: {
|
|
51
|
+
message: string;
|
|
52
|
+
type: "success";
|
|
53
|
+
icon: string;
|
|
54
|
+
};
|
|
55
|
+
verboseOff: {
|
|
56
|
+
message: string;
|
|
57
|
+
type: "info";
|
|
58
|
+
icon: string;
|
|
59
|
+
};
|
|
60
|
+
backgroundOn: {
|
|
61
|
+
message: string;
|
|
62
|
+
type: "success";
|
|
63
|
+
icon: string;
|
|
64
|
+
};
|
|
65
|
+
backgroundOff: {
|
|
66
|
+
message: string;
|
|
67
|
+
type: "info";
|
|
68
|
+
icon: string;
|
|
69
|
+
};
|
|
70
|
+
autoEditOn: {
|
|
71
|
+
message: string;
|
|
72
|
+
type: "warning";
|
|
73
|
+
icon: string;
|
|
74
|
+
};
|
|
75
|
+
autoEditOff: {
|
|
76
|
+
message: string;
|
|
77
|
+
type: "info";
|
|
78
|
+
icon: string;
|
|
79
|
+
};
|
|
80
|
+
taskMoved: (taskId: string) => {
|
|
81
|
+
message: string;
|
|
82
|
+
type: "success";
|
|
83
|
+
icon: string;
|
|
84
|
+
};
|
|
85
|
+
cleared: {
|
|
86
|
+
message: string;
|
|
87
|
+
type: "info";
|
|
88
|
+
icon: string;
|
|
89
|
+
};
|
|
90
|
+
copied: {
|
|
91
|
+
message: string;
|
|
92
|
+
type: "success";
|
|
93
|
+
icon: string;
|
|
94
|
+
};
|
|
95
|
+
saved: {
|
|
96
|
+
message: string;
|
|
97
|
+
type: "success";
|
|
98
|
+
icon: string;
|
|
99
|
+
};
|
|
100
|
+
interrupted: {
|
|
101
|
+
message: string;
|
|
102
|
+
type: "warning";
|
|
103
|
+
icon: string;
|
|
104
|
+
};
|
|
105
|
+
contextLow: {
|
|
106
|
+
message: string;
|
|
107
|
+
type: "warning";
|
|
108
|
+
icon: string;
|
|
109
|
+
};
|
|
110
|
+
taskCompleted: (_taskId: string, command: string) => {
|
|
111
|
+
message: string;
|
|
112
|
+
type: "success";
|
|
113
|
+
icon: string;
|
|
114
|
+
duration: number;
|
|
115
|
+
};
|
|
116
|
+
taskFailed: (_taskId: string, command: string) => {
|
|
117
|
+
message: string;
|
|
118
|
+
type: "error";
|
|
119
|
+
icon: string;
|
|
120
|
+
duration: number;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
export default ToastNotification;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Notification Component
|
|
3
|
+
* Brief, auto-dismissing notifications for user feedback
|
|
4
|
+
*
|
|
5
|
+
* Used for mode toggles (Ctrl+B, Ctrl+O) and other transient feedback
|
|
6
|
+
* that shouldn't pollute chat history.
|
|
7
|
+
*/
|
|
8
|
+
import React, { useState, useEffect } from "react";
|
|
9
|
+
import { Box, Text } from "ink";
|
|
10
|
+
/**
|
|
11
|
+
* Get icon and color based on toast type
|
|
12
|
+
*/
|
|
13
|
+
function getToastStyle(type) {
|
|
14
|
+
switch (type) {
|
|
15
|
+
case "success":
|
|
16
|
+
return { icon: "â", color: "green", bgColor: "greenBright" };
|
|
17
|
+
case "warning":
|
|
18
|
+
return { icon: "â ", color: "yellow", bgColor: "yellowBright" };
|
|
19
|
+
case "error":
|
|
20
|
+
return { icon: "â", color: "red", bgColor: "redBright" };
|
|
21
|
+
case "info":
|
|
22
|
+
default:
|
|
23
|
+
return { icon: "âš", color: "cyan", bgColor: "cyanBright" };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Single Toast Component
|
|
28
|
+
*/
|
|
29
|
+
export function ToastNotification({ toast, onDismiss }) {
|
|
30
|
+
const [visible, setVisible] = useState(false);
|
|
31
|
+
const [fadeOut, setFadeOut] = useState(false);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!toast) {
|
|
34
|
+
setVisible(false);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Show toast
|
|
38
|
+
setVisible(true);
|
|
39
|
+
setFadeOut(false);
|
|
40
|
+
const duration = toast.duration || 2000;
|
|
41
|
+
// Start fade out slightly before hiding
|
|
42
|
+
const fadeTimer = setTimeout(() => {
|
|
43
|
+
setFadeOut(true);
|
|
44
|
+
}, duration - 300);
|
|
45
|
+
// Hide and dismiss
|
|
46
|
+
const hideTimer = setTimeout(() => {
|
|
47
|
+
setVisible(false);
|
|
48
|
+
onDismiss?.();
|
|
49
|
+
}, duration);
|
|
50
|
+
return () => {
|
|
51
|
+
clearTimeout(fadeTimer);
|
|
52
|
+
clearTimeout(hideTimer);
|
|
53
|
+
};
|
|
54
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
|
+
}, [toast]); // Intentionally exclude onDismiss to prevent timer reset on re-render
|
|
56
|
+
if (!visible || !toast)
|
|
57
|
+
return null;
|
|
58
|
+
const style = getToastStyle(toast.type);
|
|
59
|
+
const icon = toast.icon || style.icon;
|
|
60
|
+
return (React.createElement(Box, { marginBottom: 1, paddingX: 1 },
|
|
61
|
+
React.createElement(Box, { borderStyle: "round", borderColor: fadeOut ? "gray" : style.color, paddingX: 2, paddingY: 0 },
|
|
62
|
+
React.createElement(Text, { color: fadeOut ? "gray" : style.color, bold: true }, icon),
|
|
63
|
+
React.createElement(Text, { color: fadeOut ? "gray" : "white" },
|
|
64
|
+
" ",
|
|
65
|
+
toast.message))));
|
|
66
|
+
}
|
|
67
|
+
export function ToastContainer({ toasts, onDismiss, maxVisible = 3 }) {
|
|
68
|
+
const visibleToasts = toasts.slice(0, maxVisible);
|
|
69
|
+
if (visibleToasts.length === 0)
|
|
70
|
+
return null;
|
|
71
|
+
return (React.createElement(Box, { flexDirection: "column" }, visibleToasts.map((toast) => (React.createElement(ToastNotification, { key: toast.id, toast: toast, onDismiss: () => onDismiss(toast.id) })))));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Hook for managing toast state
|
|
75
|
+
*/
|
|
76
|
+
export function useToasts() {
|
|
77
|
+
const [toasts, setToasts] = useState([]);
|
|
78
|
+
const addToast = (toast) => {
|
|
79
|
+
const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
|
|
80
|
+
setToasts((prev) => [...prev, { ...toast, id }]);
|
|
81
|
+
return id;
|
|
82
|
+
};
|
|
83
|
+
const removeToast = (id) => {
|
|
84
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
85
|
+
};
|
|
86
|
+
const clearToasts = () => {
|
|
87
|
+
setToasts([]);
|
|
88
|
+
};
|
|
89
|
+
// Convenience methods
|
|
90
|
+
const success = (message, icon, duration) => addToast({ message, type: "success", icon, duration });
|
|
91
|
+
const info = (message, icon, duration) => addToast({ message, type: "info", icon, duration });
|
|
92
|
+
const warning = (message, icon, duration) => addToast({ message, type: "warning", icon, duration });
|
|
93
|
+
const error = (message, icon, duration) => addToast({ message, type: "error", icon, duration });
|
|
94
|
+
return {
|
|
95
|
+
toasts,
|
|
96
|
+
addToast,
|
|
97
|
+
removeToast,
|
|
98
|
+
clearToasts,
|
|
99
|
+
success,
|
|
100
|
+
info,
|
|
101
|
+
warning,
|
|
102
|
+
error,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Pre-defined toast messages for common actions
|
|
107
|
+
*/
|
|
108
|
+
export const TOAST_MESSAGES = {
|
|
109
|
+
// Mode toggles
|
|
110
|
+
verboseOn: { message: "Verbose mode ON - showing full details", type: "success", icon: "đ" },
|
|
111
|
+
verboseOff: { message: "Verbose mode OFF - concise output", type: "info", icon: "đ" },
|
|
112
|
+
backgroundOn: { message: "Background mode ON - commands run in background", type: "success", icon: "đ" },
|
|
113
|
+
backgroundOff: { message: "Background mode OFF - foreground execution", type: "info", icon: "âļī¸" },
|
|
114
|
+
autoEditOn: { message: "Auto-edit ON - confirmations bypassed", type: "warning", icon: "âĄ" },
|
|
115
|
+
autoEditOff: { message: "Auto-edit OFF - confirmations enabled", type: "info", icon: "đĄī¸" },
|
|
116
|
+
// Background task operations
|
|
117
|
+
taskMoved: (taskId) => ({
|
|
118
|
+
message: `Command moved to background (${taskId})`,
|
|
119
|
+
type: "success",
|
|
120
|
+
icon: "đĻ"
|
|
121
|
+
}),
|
|
122
|
+
// Other common actions
|
|
123
|
+
cleared: { message: "Chat history cleared", type: "info", icon: "đī¸" },
|
|
124
|
+
copied: { message: "Copied to clipboard", type: "success", icon: "đ" },
|
|
125
|
+
saved: { message: "Changes saved", type: "success", icon: "đž" },
|
|
126
|
+
interrupted: { message: "Operation cancelled", type: "warning", icon: "âšī¸" },
|
|
127
|
+
contextLow: { message: "Context running low - consider /clear", type: "warning", icon: "â ī¸" },
|
|
128
|
+
// Background task notifications
|
|
129
|
+
taskCompleted: (_taskId, command) => ({
|
|
130
|
+
message: `Task done: ${command.length > 30 ? command.slice(0, 30) + '...' : command}`,
|
|
131
|
+
type: "success",
|
|
132
|
+
icon: "â
",
|
|
133
|
+
duration: 3000,
|
|
134
|
+
}),
|
|
135
|
+
taskFailed: (_taskId, command) => ({
|
|
136
|
+
message: `Task failed: ${command.length > 30 ? command.slice(0, 30) + '...' : command}`,
|
|
137
|
+
type: "error",
|
|
138
|
+
icon: "â",
|
|
139
|
+
duration: 4000,
|
|
140
|
+
}),
|
|
141
|
+
};
|
|
142
|
+
export default ToastNotification;
|
|
143
|
+
//# sourceMappingURL=toast-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-notification.js","sourceRoot":"","sources":["../../../src/ui/components/toast-notification.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAehC;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,EAAE,IAAI;KACf,CAAC;IACF,UAAU,EAAE,CAAC,OAAe,EAAE,OAAe,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO,EAAE,gBAAgB,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE;QACvF,IAAI,EAAE,OAAgB;QACtB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Welcome Panel Component
|
|
3
|
+
* Shows helpful tips and example prompts when chat is empty
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface WelcomePanelProps {
|
|
7
|
+
projectName: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function WelcomePanel({ projectName }: WelcomePanelProps): React.JSX.Element;
|
|
10
|
+
export default WelcomePanel;
|