wave-code 0.2.1 → 0.5.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/dist/commands/plugin/disable.d.ts +2 -1
- package/dist/commands/plugin/disable.d.ts.map +1 -1
- package/dist/commands/plugin/disable.js +3 -2
- package/dist/commands/plugin/enable.d.ts +2 -1
- package/dist/commands/plugin/enable.d.ts.map +1 -1
- package/dist/commands/plugin/enable.js +3 -2
- package/dist/commands/plugin/install.d.ts +2 -1
- package/dist/commands/plugin/install.d.ts.map +1 -1
- package/dist/commands/plugin/list.d.ts.map +1 -1
- package/dist/commands/plugin/list.js +15 -3
- package/dist/commands/plugin/marketplace.d.ts +3 -0
- package/dist/commands/plugin/marketplace.d.ts.map +1 -1
- package/dist/commands/plugin/marketplace.js +15 -1
- package/dist/commands/plugin/uninstall.d.ts +4 -0
- package/dist/commands/plugin/uninstall.d.ts.map +1 -0
- package/dist/commands/plugin/uninstall.js +29 -0
- package/dist/commands/plugin/update.d.ts +4 -0
- package/dist/commands/plugin/update.d.ts.map +1 -0
- package/dist/commands/plugin/update.js +15 -0
- package/dist/components/ChatInterface.d.ts.map +1 -1
- package/dist/components/ChatInterface.js +2 -2
- package/dist/components/CommandSelector.d.ts.map +1 -1
- package/dist/components/CommandSelector.js +9 -3
- package/dist/components/Confirmation.d.ts.map +1 -1
- package/dist/components/Confirmation.js +73 -20
- package/dist/components/DiffDisplay.d.ts +0 -1
- package/dist/components/DiffDisplay.d.ts.map +1 -1
- package/dist/components/DiffDisplay.js +38 -59
- package/dist/components/DiscoverView.d.ts +3 -0
- package/dist/components/DiscoverView.d.ts.map +1 -0
- package/dist/components/DiscoverView.js +25 -0
- package/dist/components/FileSelector.js +1 -1
- package/dist/components/HistorySearch.d.ts +8 -0
- package/dist/components/HistorySearch.d.ts.map +1 -0
- package/dist/components/HistorySearch.js +67 -0
- package/dist/components/InputBox.d.ts +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +29 -19
- package/dist/components/InstalledView.d.ts +3 -0
- package/dist/components/InstalledView.d.ts.map +1 -0
- package/dist/components/InstalledView.js +30 -0
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown.js +24 -10
- package/dist/components/MarketplaceAddForm.d.ts +3 -0
- package/dist/components/MarketplaceAddForm.d.ts.map +1 -0
- package/dist/components/MarketplaceAddForm.js +26 -0
- package/dist/components/MarketplaceDetail.d.ts +3 -0
- package/dist/components/MarketplaceDetail.d.ts.map +1 -0
- package/dist/components/MarketplaceDetail.js +38 -0
- package/dist/components/MarketplaceList.d.ts +9 -0
- package/dist/components/MarketplaceList.d.ts.map +1 -0
- package/dist/components/MarketplaceList.js +16 -0
- package/dist/components/MarketplaceView.d.ts +3 -0
- package/dist/components/MarketplaceView.d.ts.map +1 -0
- package/dist/components/MarketplaceView.js +28 -0
- package/dist/components/PlanDisplay.d.ts.map +1 -1
- package/dist/components/PlanDisplay.js +2 -2
- package/dist/components/PluginDetail.d.ts +3 -0
- package/dist/components/PluginDetail.d.ts.map +1 -0
- package/dist/components/PluginDetail.js +63 -0
- package/dist/components/PluginList.d.ts +14 -0
- package/dist/components/PluginList.d.ts.map +1 -0
- package/dist/components/PluginList.js +12 -0
- package/dist/components/PluginManagerShell.d.ts +5 -0
- package/dist/components/PluginManagerShell.d.ts.map +1 -0
- package/dist/components/PluginManagerShell.js +89 -0
- package/dist/components/PluginManagerTypes.d.ts +33 -0
- package/dist/components/PluginManagerTypes.d.ts.map +1 -0
- package/dist/components/PluginManagerTypes.js +1 -0
- package/dist/components/RewindCommand.d.ts +9 -0
- package/dist/components/RewindCommand.d.ts.map +1 -0
- package/dist/components/RewindCommand.js +42 -0
- package/dist/components/SessionSelector.d.ts +11 -0
- package/dist/components/SessionSelector.d.ts.map +1 -0
- package/dist/components/SessionSelector.js +38 -0
- package/dist/components/SubagentBlock.d.ts.map +1 -1
- package/dist/components/SubagentBlock.js +24 -1
- package/dist/components/TaskManager.d.ts +6 -0
- package/dist/components/TaskManager.d.ts.map +1 -0
- package/dist/components/TaskManager.js +114 -0
- package/dist/components/ToolResultDisplay.d.ts.map +1 -1
- package/dist/components/ToolResultDisplay.js +2 -1
- package/dist/contexts/PluginManagerContext.d.ts +4 -0
- package/dist/contexts/PluginManagerContext.d.ts.map +1 -0
- package/dist/contexts/PluginManagerContext.js +9 -0
- package/dist/contexts/useChat.d.ts +7 -4
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +37 -12
- package/dist/hooks/useInputManager.d.ts +8 -16
- package/dist/hooks/useInputManager.d.ts.map +1 -1
- package/dist/hooks/useInputManager.js +39 -55
- package/dist/hooks/usePluginManager.d.ts +3 -0
- package/dist/hooks/usePluginManager.d.ts.map +1 -0
- package/dist/hooks/usePluginManager.js +227 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +150 -177
- package/dist/managers/InputManager.d.ts +18 -26
- package/dist/managers/InputManager.d.ts.map +1 -1
- package/dist/managers/InputManager.js +93 -119
- package/dist/plugin-manager-cli.d.ts +6 -0
- package/dist/plugin-manager-cli.d.ts.map +1 -0
- package/dist/plugin-manager-cli.js +12 -0
- package/dist/session-selector-cli.d.ts +2 -0
- package/dist/session-selector-cli.d.ts.map +1 -0
- package/dist/session-selector-cli.js +25 -0
- package/package.json +9 -5
- package/src/commands/plugin/disable.ts +7 -3
- package/src/commands/plugin/enable.ts +7 -3
- package/src/commands/plugin/install.ts +2 -1
- package/src/commands/plugin/list.ts +21 -3
- package/src/commands/plugin/marketplace.ts +17 -1
- package/src/commands/plugin/uninstall.ts +39 -0
- package/src/commands/plugin/update.ts +19 -0
- package/src/components/ChatInterface.tsx +2 -1
- package/src/components/CommandSelector.tsx +10 -3
- package/src/components/Confirmation.tsx +115 -25
- package/src/components/DiffDisplay.tsx +60 -106
- package/src/components/DiscoverView.tsx +31 -0
- package/src/components/FileSelector.tsx +1 -1
- package/src/components/HistorySearch.tsx +148 -0
- package/src/components/InputBox.tsx +51 -34
- package/src/components/InstalledView.tsx +61 -0
- package/src/components/Markdown.tsx +44 -28
- package/src/components/MarketplaceAddForm.tsx +39 -0
- package/src/components/MarketplaceDetail.tsx +79 -0
- package/src/components/MarketplaceList.tsx +52 -0
- package/src/components/MarketplaceView.tsx +43 -0
- package/src/components/PlanDisplay.tsx +14 -19
- package/src/components/PluginDetail.tsx +147 -0
- package/src/components/PluginList.tsx +51 -0
- package/src/components/PluginManagerShell.tsx +189 -0
- package/src/components/PluginManagerTypes.ts +47 -0
- package/src/components/RewindCommand.tsx +114 -0
- package/src/components/SessionSelector.tsx +127 -0
- package/src/components/SubagentBlock.tsx +34 -1
- package/src/components/{BashShellManager.tsx → TaskManager.tsx} +79 -75
- package/src/components/ToolResultDisplay.tsx +6 -2
- package/src/contexts/PluginManagerContext.ts +15 -0
- package/src/contexts/useChat.tsx +51 -20
- package/src/hooks/useInputManager.ts +39 -71
- package/src/hooks/usePluginManager.ts +302 -0
- package/src/index.ts +241 -280
- package/src/managers/InputManager.ts +113 -162
- package/src/plugin-manager-cli.tsx +13 -0
- package/src/session-selector-cli.tsx +37 -0
- package/dist/components/BashHistorySelector.d.ts +0 -11
- package/dist/components/BashHistorySelector.d.ts.map +0 -1
- package/dist/components/BashHistorySelector.js +0 -93
- package/dist/components/BashShellManager.d.ts +0 -6
- package/dist/components/BashShellManager.d.ts.map +0 -1
- package/dist/components/BashShellManager.js +0 -116
- package/dist/hooks/usePagination.d.ts +0 -20
- package/dist/hooks/usePagination.d.ts.map +0 -1
- package/dist/hooks/usePagination.js +0 -168
- package/src/components/BashHistorySelector.tsx +0 -181
- package/src/hooks/usePagination.ts +0 -203
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolResultDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ToolResultDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ToolResultDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ToolResultDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAyI9D,CAAC"}
|
|
@@ -33,6 +33,7 @@ export const ToolResultDisplay = ({ block, isExpanded = false, }) => {
|
|
|
33
33
|
return imageCount === 1 ? "🖼️" : `🖼️×${imageCount}`;
|
|
34
34
|
};
|
|
35
35
|
const toolName = name ? String(name) : "Tool";
|
|
36
|
+
const isBackgroundable = stage === "running" && (toolName === "Bash" || toolName === "Task");
|
|
36
37
|
// Get shortResult, if not available show last 5 lines of result
|
|
37
38
|
const getShortResult = () => {
|
|
38
39
|
if (block.shortResult) {
|
|
@@ -49,5 +50,5 @@ export const ToolResultDisplay = ({ block, isExpanded = false, }) => {
|
|
|
49
50
|
return null;
|
|
50
51
|
};
|
|
51
52
|
const shortResult = getShortResult();
|
|
52
|
-
return (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "magenta", children: "\uD83D\uDD27 " }), _jsx(Text, { color: "white", children: toolName }), !isExpanded && compactParams && (_jsxs(Text, { color: "gray", children: [" ", compactParams] })), _jsxs(Text, { color: getStatusColor(), children: [" ", getStatusText()] }), hasImages() && _jsxs(Text, { color: "blue", children: [" ", getImageIndicator()] })] }), !isExpanded && shortResult && !error && (_jsx(Box, { paddingLeft: 2, borderLeft: true, borderColor: "gray", flexDirection: "column", children: shortResult.split("\n").map((line, index) => (_jsx(Text, { color: "white", children: line }, index))) })), isExpanded && parameters && (_jsxs(Box, { paddingLeft: 2, borderLeft: true, borderColor: "gray", flexDirection: "column", children: [_jsx(Text, { color: "cyan", bold: true, children: "Parameters:" }), _jsx(Text, { color: "gray", children: parameters })] })), isExpanded && result && (_jsx(Box, { flexDirection: "column", children: _jsxs(Box, { paddingLeft: 2, borderLeft: true, borderColor: "green", flexDirection: "column", children: [_jsx(Text, { color: "cyan", bold: true, children: "Result:" }), _jsx(Text, { color: "white", children: result })] }) })), error && (_jsx(Box, { children: _jsxs(Text, { color: "red", children: ["Error: ", typeof error === "string" ? error : String(error)] }) })), stage === "end" && (_jsx(DiffDisplay, { toolName: name, parameters: parameters }))] }));
|
|
53
|
+
return (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "magenta", children: "\uD83D\uDD27 " }), _jsx(Text, { color: "white", children: toolName }), !isExpanded && compactParams && (_jsxs(Text, { color: "gray", children: [" ", compactParams] })), _jsxs(Text, { color: getStatusColor(), children: [" ", getStatusText()] }), hasImages() && _jsxs(Text, { color: "blue", children: [" ", getImageIndicator()] }), isBackgroundable && _jsx(Text, { color: "gray", children: " [Ctrl-B] Background" })] }), !isExpanded && shortResult && !error && (_jsx(Box, { paddingLeft: 2, borderLeft: true, borderColor: "gray", flexDirection: "column", children: shortResult.split("\n").map((line, index) => (_jsx(Text, { color: "white", children: line }, index))) })), isExpanded && parameters && (_jsxs(Box, { paddingLeft: 2, borderLeft: true, borderColor: "gray", flexDirection: "column", children: [_jsx(Text, { color: "cyan", bold: true, children: "Parameters:" }), _jsx(Text, { color: "gray", children: parameters })] })), isExpanded && result && (_jsx(Box, { flexDirection: "column", children: _jsxs(Box, { paddingLeft: 2, borderLeft: true, borderColor: "green", flexDirection: "column", children: [_jsx(Text, { color: "cyan", bold: true, children: "Result:" }), _jsx(Text, { color: "white", children: result })] }) })), error && (_jsx(Box, { children: _jsxs(Text, { color: "red", children: ["Error: ", typeof error === "string" ? error : String(error)] }) })), stage === "end" && success && (_jsx(DiffDisplay, { toolName: name, parameters: parameters }))] }));
|
|
53
54
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PluginManagerContextType } from "../components/PluginManagerTypes.js";
|
|
2
|
+
export declare const PluginManagerContext: import("react").Context<PluginManagerContextType | null>;
|
|
3
|
+
export declare const usePluginManagerContext: () => PluginManagerContextType;
|
|
4
|
+
//# sourceMappingURL=PluginManagerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginManagerContext.d.ts","sourceRoot":"","sources":["../../src/contexts/PluginManagerContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,eAAO,MAAM,oBAAoB,0DACqB,CAAC;AAEvD,eAAO,MAAM,uBAAuB,gCAQnC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
export const PluginManagerContext = createContext(null);
|
|
3
|
+
export const usePluginManagerContext = () => {
|
|
4
|
+
const context = useContext(PluginManagerContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error("usePluginManagerContext must be used within a PluginManagerProvider");
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { Message, McpServerStatus,
|
|
2
|
+
import type { Message, McpServerStatus, BackgroundTask, SlashCommand, PermissionDecision, PermissionMode } from "wave-agent-sdk";
|
|
3
3
|
export interface ChatContextType {
|
|
4
4
|
messages: Message[];
|
|
5
5
|
isLoading: boolean;
|
|
@@ -18,13 +18,13 @@ export interface ChatContextType {
|
|
|
18
18
|
mcpServers: McpServerStatus[];
|
|
19
19
|
connectMcpServer: (serverName: string) => Promise<boolean>;
|
|
20
20
|
disconnectMcpServer: (serverName: string) => Promise<boolean>;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
backgroundTasks: BackgroundTask[];
|
|
22
|
+
getBackgroundTaskOutput: (taskId: string) => {
|
|
23
23
|
stdout: string;
|
|
24
24
|
stderr: string;
|
|
25
25
|
status: string;
|
|
26
26
|
} | null;
|
|
27
|
-
|
|
27
|
+
stopBackgroundTask: (taskId: string) => boolean;
|
|
28
28
|
slashCommands: SlashCommand[];
|
|
29
29
|
hasSlashCommand: (commandId: string) => boolean;
|
|
30
30
|
subagentMessages: Record<string, Message[]>;
|
|
@@ -41,6 +41,9 @@ export interface ChatContextType {
|
|
|
41
41
|
hideConfirmation: () => void;
|
|
42
42
|
handleConfirmationDecision: (decision: PermissionDecision) => void;
|
|
43
43
|
handleConfirmationCancel: () => void;
|
|
44
|
+
backgroundCurrentTask: () => void;
|
|
45
|
+
rewindId: number;
|
|
46
|
+
handleRewindSelect: (index: number) => Promise<void>;
|
|
44
47
|
}
|
|
45
48
|
export declare const useChat: () => ChatContextType;
|
|
46
49
|
export interface ChatProviderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/contexts/useChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/contexts/useChat.tsx"],"names":[],"mappings":"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"}
|
package/dist/contexts/useChat.js
CHANGED
|
@@ -27,8 +27,8 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
27
27
|
const [userInputHistory, setUserInputHistory] = useState([]);
|
|
28
28
|
// MCP State
|
|
29
29
|
const [mcpServers, setMcpServers] = useState([]);
|
|
30
|
-
// Background
|
|
31
|
-
const [
|
|
30
|
+
// Background tasks state
|
|
31
|
+
const [backgroundTasks, setBackgroundTasks] = useState([]);
|
|
32
32
|
// Command state
|
|
33
33
|
const [slashCommands, setSlashCommands] = useState([]);
|
|
34
34
|
// Subagent messages state
|
|
@@ -40,6 +40,8 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
40
40
|
const [confirmingTool, setConfirmingTool] = useState();
|
|
41
41
|
const [confirmationQueue, setConfirmationQueue] = useState([]);
|
|
42
42
|
const [currentConfirmation, setCurrentConfirmation] = useState(null);
|
|
43
|
+
// Rewind state
|
|
44
|
+
const [rewindId, setRewindId] = useState(0);
|
|
43
45
|
const agentRef = useRef(null);
|
|
44
46
|
// Permission confirmation methods with queue support
|
|
45
47
|
const showConfirmation = useCallback(async (toolName, toolInput, suggestedPrefix, hidePersistentOption) => {
|
|
@@ -80,8 +82,8 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
80
82
|
onCompressionStateChange: (isCompressingState) => {
|
|
81
83
|
setIsCompressing(isCompressingState);
|
|
82
84
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
onTasksChange: (tasks) => {
|
|
86
|
+
setBackgroundTasks([...tasks]);
|
|
85
87
|
},
|
|
86
88
|
onSubagentMessagesChange: (subagentId, messages) => {
|
|
87
89
|
logger.debug("onSubagentMessagesChange", subagentId, messages.length);
|
|
@@ -93,6 +95,9 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
93
95
|
onPermissionModeChange: (mode) => {
|
|
94
96
|
setPermissionModeState(mode);
|
|
95
97
|
},
|
|
98
|
+
onSlashCommandsChange: (commands) => {
|
|
99
|
+
setSlashCommands([...commands]);
|
|
100
|
+
},
|
|
96
101
|
};
|
|
97
102
|
try {
|
|
98
103
|
// Create the permission callback inside the try block to access showConfirmation
|
|
@@ -244,16 +249,16 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
244
249
|
const disconnectMcpServer = useCallback(async (serverName) => {
|
|
245
250
|
return (await agentRef.current?.disconnectMcpServer(serverName)) ?? false;
|
|
246
251
|
}, []);
|
|
247
|
-
// Background
|
|
248
|
-
const
|
|
252
|
+
// Background task management methods - delegate to Agent
|
|
253
|
+
const getBackgroundTaskOutput = useCallback((taskId) => {
|
|
249
254
|
if (!agentRef.current)
|
|
250
255
|
return null;
|
|
251
|
-
return agentRef.current.
|
|
256
|
+
return agentRef.current.getBackgroundTaskOutput(taskId);
|
|
252
257
|
}, []);
|
|
253
|
-
const
|
|
258
|
+
const stopBackgroundTask = useCallback((taskId) => {
|
|
254
259
|
if (!agentRef.current)
|
|
255
260
|
return false;
|
|
256
|
-
return agentRef.current.
|
|
261
|
+
return agentRef.current.stopBackgroundTask(taskId);
|
|
257
262
|
}, []);
|
|
258
263
|
const hasSlashCommand = useCallback((commandId) => {
|
|
259
264
|
if (!agentRef.current)
|
|
@@ -296,6 +301,23 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
296
301
|
}
|
|
297
302
|
hideConfirmation();
|
|
298
303
|
}, [currentConfirmation, hideConfirmation]);
|
|
304
|
+
const backgroundCurrentTask = useCallback(() => {
|
|
305
|
+
agentRef.current?.backgroundCurrentTask();
|
|
306
|
+
}, []);
|
|
307
|
+
const handleRewindSelect = useCallback(async (index) => {
|
|
308
|
+
if (agentRef.current) {
|
|
309
|
+
try {
|
|
310
|
+
await agentRef.current.truncateHistory(index);
|
|
311
|
+
// Clear terminal screen after rewind
|
|
312
|
+
process.stdout.write("\x1Bc", () => {
|
|
313
|
+
setRewindId((prev) => prev + 1);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
catch (error) {
|
|
317
|
+
logger.error("Failed to rewind:", error);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}, []);
|
|
299
321
|
// Listen for Ctrl+O hotkey to toggle collapse/expand state and ESC to cancel confirmation
|
|
300
322
|
useInput((input, key) => {
|
|
301
323
|
if (key.ctrl && input === "o") {
|
|
@@ -327,9 +349,9 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
327
349
|
mcpServers,
|
|
328
350
|
connectMcpServer,
|
|
329
351
|
disconnectMcpServer,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
352
|
+
backgroundTasks,
|
|
353
|
+
getBackgroundTaskOutput,
|
|
354
|
+
stopBackgroundTask,
|
|
333
355
|
slashCommands,
|
|
334
356
|
hasSlashCommand,
|
|
335
357
|
subagentMessages,
|
|
@@ -341,6 +363,9 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
|
|
|
341
363
|
hideConfirmation,
|
|
342
364
|
handleConfirmationDecision,
|
|
343
365
|
handleConfirmationCancel,
|
|
366
|
+
backgroundCurrentTask,
|
|
367
|
+
rewindId,
|
|
368
|
+
handleRewindSelect,
|
|
344
369
|
};
|
|
345
370
|
return (_jsx(ChatContext.Provider, { value: contextValue, children: children }));
|
|
346
371
|
};
|
|
@@ -12,13 +12,13 @@ export declare const useInputManager: (callbacks?: Partial<InputManagerCallbacks
|
|
|
12
12
|
showCommandSelector: boolean;
|
|
13
13
|
commandSearchQuery: string;
|
|
14
14
|
slashPosition: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exclamationPosition: number;
|
|
15
|
+
showHistorySearch: boolean;
|
|
16
|
+
historySearchQuery: string;
|
|
18
17
|
showMemoryTypeSelector: boolean;
|
|
19
18
|
memoryMessage: string;
|
|
20
|
-
|
|
19
|
+
showTaskManager: boolean;
|
|
21
20
|
showMcpManager: boolean;
|
|
21
|
+
showRewindManager: boolean;
|
|
22
22
|
permissionMode: PermissionMode;
|
|
23
23
|
attachedImages: AttachedImage[];
|
|
24
24
|
isManagerReady: boolean;
|
|
@@ -49,15 +49,8 @@ export declare const useInputManager: (callbacks?: Partial<InputManagerCallbacks
|
|
|
49
49
|
handleCancelCommandSelect: () => void;
|
|
50
50
|
updateCommandSearchQuery: (query: string) => void;
|
|
51
51
|
checkForSlashDeletion: (cursorPos: number) => boolean;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
newInput: string;
|
|
55
|
-
newCursorPosition: number;
|
|
56
|
-
};
|
|
57
|
-
handleCancelBashHistorySelect: () => void;
|
|
58
|
-
updateBashHistorySearchQuery: (query: string) => void;
|
|
59
|
-
handleBashHistoryExecute: (command: string) => string;
|
|
60
|
-
checkForExclamationDeletion: (cursorPos: number) => boolean;
|
|
52
|
+
handleHistorySearchSelect: (prompt: string) => void;
|
|
53
|
+
handleCancelHistorySearch: () => void;
|
|
61
54
|
activateMemoryTypeSelector: (message: string) => void;
|
|
62
55
|
handleMemoryTypeSelect: (type: "project" | "user") => Promise<void>;
|
|
63
56
|
handleCancelMemoryTypeSelect: () => void;
|
|
@@ -68,8 +61,9 @@ export declare const useInputManager: (callbacks?: Partial<InputManagerCallbacks
|
|
|
68
61
|
};
|
|
69
62
|
resetHistoryNavigation: () => void;
|
|
70
63
|
handleSpecialCharInput: (char: string) => void;
|
|
71
|
-
|
|
64
|
+
setShowTaskManager: (show: boolean) => void;
|
|
72
65
|
setShowMcpManager: (show: boolean) => void;
|
|
66
|
+
setShowRewindManager: (show: boolean) => void;
|
|
73
67
|
setPermissionMode: (mode: PermissionMode) => void;
|
|
74
68
|
addImage: (imagePath: string, mimeType: string) => AttachedImage | undefined;
|
|
75
69
|
removeImage: (imageId: number) => void;
|
|
@@ -83,8 +77,6 @@ export declare const useInputManager: (callbacks?: Partial<InputManagerCallbacks
|
|
|
83
77
|
}>, isLoading?: boolean, isCommandRunning?: boolean) => Promise<void>;
|
|
84
78
|
expandLongTextPlaceholders: (text: string) => string;
|
|
85
79
|
clearLongTextMap: () => void;
|
|
86
|
-
handleBashHistoryExecuteAndSend: (command: string) => void;
|
|
87
|
-
handleBashHistoryDelete: (command: string, workdir?: string) => void;
|
|
88
80
|
handleInput: (input: string, key: Key, attachedImages: Array<{
|
|
89
81
|
id: number;
|
|
90
82
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputManager.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,eAAO,MAAM,eAAe,GAC1B,YAAW,OAAO,CAAC,qBAAqB,CAAM;;;;;;;;;;;;;;;;;;;;+
|
|
1
|
+
{"version":3,"file":"useInputManager.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,eAAO,MAAM,eAAe,GAC1B,YAAW,OAAO,CAAC,qBAAqB,CAAM;;;;;;;;;;;;;;;;;;;;+BAgIpC,MAAM,aACD,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,KAAK,IAAI;oCAQrD,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,KAAK,IAAI;;;;;;qCA2Bd,MAAM;iCAK7C,MAAM;;;;;mCAe+B,MAAM;oCAIL,MAAM;wCAKF,MAAM;mCAKjD,MAAM;;;;mCAYN,MAAM;;;;;sCAemC,MAAM;uCAIL,MAAM;wCAKL,MAAM;;0CASJ,MAAM;mCAKhD,SAAS,GAAG,MAAM;;mCAWiB,MAAM,EAAE;iCAK5C,IAAI,GAAG,MAAM,gBAAgB,MAAM;;;;;mCAgBC,MAAM;+BA8Ef,OAAO;8BAGR,OAAO;iCAGJ,OAAO;8BAIV,cAAc;0BAMlB,MAAM,YAAY,MAAM;2BAGvB,MAAM;;;8BAWH,MAAM;mCAKxB,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,cAC1D,OAAO,qBACA,OAAO;uCAUkB,MAAM;;yBAU1C,MAAM,OACR,GAAG,kBACQ,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,cAC1D,OAAO,qBACA,OAAO,gBACX,MAAM,IAAI;yBAvIgB,MAAM;kCAIG,MAAM;;CA0J9D,CAAC"}
|
|
@@ -18,17 +18,17 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
18
18
|
query: "",
|
|
19
19
|
position: -1,
|
|
20
20
|
});
|
|
21
|
-
const [
|
|
21
|
+
const [historySearchState, setHistorySearchState] = useState({
|
|
22
22
|
show: false,
|
|
23
23
|
query: "",
|
|
24
|
-
position: -1,
|
|
25
24
|
});
|
|
26
25
|
const [memoryTypeSelectorState, setMemoryTypeSelectorState] = useState({
|
|
27
26
|
show: false,
|
|
28
27
|
message: "",
|
|
29
28
|
});
|
|
30
|
-
const [
|
|
29
|
+
const [showTaskManager, setShowTaskManager] = useState(false);
|
|
31
30
|
const [showMcpManager, setShowMcpManager] = useState(false);
|
|
31
|
+
const [showRewindManager, setShowRewindManager] = useState(false);
|
|
32
32
|
const [permissionMode, setPermissionModeState] = useState("default");
|
|
33
33
|
const [attachedImages, setAttachedImages] = useState([]);
|
|
34
34
|
// Create InputManager on mount and update callbacks when they change
|
|
@@ -45,25 +45,29 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
45
45
|
onCommandSelectorStateChange: (show, query, position) => {
|
|
46
46
|
setCommandSelectorState({ show, query, position });
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
onHistorySearchStateChange: (show, query) => {
|
|
49
|
+
setHistorySearchState({ show, query });
|
|
50
50
|
},
|
|
51
51
|
onMemoryTypeSelectorStateChange: (show, message) => {
|
|
52
52
|
setMemoryTypeSelectorState({ show, message });
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
onTaskManagerStateChange: (show) => {
|
|
55
|
+
setShowTaskManager(show);
|
|
56
56
|
},
|
|
57
57
|
onMcpManagerStateChange: (show) => {
|
|
58
58
|
setShowMcpManager(show);
|
|
59
59
|
},
|
|
60
|
+
onRewindManagerStateChange: (show) => {
|
|
61
|
+
setShowRewindManager(show);
|
|
62
|
+
},
|
|
60
63
|
onPermissionModeChange: (mode) => {
|
|
61
64
|
setPermissionModeState(mode);
|
|
62
65
|
callbacks.onPermissionModeChange?.(mode);
|
|
63
66
|
},
|
|
64
67
|
onImagesStateChange: setAttachedImages,
|
|
65
|
-
|
|
68
|
+
onShowTaskManager: () => setShowTaskManager(true),
|
|
66
69
|
onShowMcpManager: () => setShowMcpManager(true),
|
|
70
|
+
onShowRewindManager: () => setShowRewindManager(true),
|
|
67
71
|
...callbacks,
|
|
68
72
|
});
|
|
69
73
|
managerRef.current = manager;
|
|
@@ -81,25 +85,29 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
81
85
|
onCommandSelectorStateChange: (show, query, position) => {
|
|
82
86
|
setCommandSelectorState({ show, query, position });
|
|
83
87
|
},
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
onHistorySearchStateChange: (show, query) => {
|
|
89
|
+
setHistorySearchState({ show, query });
|
|
86
90
|
},
|
|
87
91
|
onMemoryTypeSelectorStateChange: (show, message) => {
|
|
88
92
|
setMemoryTypeSelectorState({ show, message });
|
|
89
93
|
},
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
onTaskManagerStateChange: (show) => {
|
|
95
|
+
setShowTaskManager(show);
|
|
92
96
|
},
|
|
93
97
|
onMcpManagerStateChange: (show) => {
|
|
94
98
|
setShowMcpManager(show);
|
|
95
99
|
},
|
|
100
|
+
onRewindManagerStateChange: (show) => {
|
|
101
|
+
setShowRewindManager(show);
|
|
102
|
+
},
|
|
96
103
|
onPermissionModeChange: (mode) => {
|
|
97
104
|
setPermissionModeState(mode);
|
|
98
105
|
callbacks.onPermissionModeChange?.(mode);
|
|
99
106
|
},
|
|
100
107
|
onImagesStateChange: setAttachedImages,
|
|
101
|
-
|
|
108
|
+
onShowTaskManager: () => setShowTaskManager(true),
|
|
102
109
|
onShowMcpManager: () => setShowMcpManager(true),
|
|
110
|
+
onShowRewindManager: () => setShowRewindManager(true),
|
|
103
111
|
...callbacks,
|
|
104
112
|
});
|
|
105
113
|
}
|
|
@@ -178,27 +186,12 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
178
186
|
const checkForSlashDeletion = useCallback((cursorPos) => {
|
|
179
187
|
return managerRef.current?.checkForSlashDeletion(cursorPos) || false;
|
|
180
188
|
}, []);
|
|
181
|
-
//
|
|
182
|
-
const
|
|
183
|
-
managerRef.current?.
|
|
189
|
+
// History search methods
|
|
190
|
+
const handleHistorySearchSelect = useCallback((prompt) => {
|
|
191
|
+
managerRef.current?.handleHistorySearchSelect(prompt);
|
|
184
192
|
}, []);
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
newInput: inputText,
|
|
188
|
-
newCursorPosition: cursorPosition,
|
|
189
|
-
});
|
|
190
|
-
}, [inputText, cursorPosition]);
|
|
191
|
-
const handleCancelBashHistorySelect = useCallback(() => {
|
|
192
|
-
managerRef.current?.handleCancelBashHistorySelect();
|
|
193
|
-
}, []);
|
|
194
|
-
const updateBashHistorySearchQuery = useCallback((query) => {
|
|
195
|
-
managerRef.current?.updateBashHistorySearchQuery(query);
|
|
196
|
-
}, []);
|
|
197
|
-
const handleBashHistoryExecute = useCallback((command) => {
|
|
198
|
-
return managerRef.current?.handleBashHistoryExecute(command) || command;
|
|
199
|
-
}, []);
|
|
200
|
-
const checkForExclamationDeletion = useCallback((cursorPos) => {
|
|
201
|
-
return managerRef.current?.checkForExclamationDeletion(cursorPos) || false;
|
|
193
|
+
const handleCancelHistorySearch = useCallback(() => {
|
|
194
|
+
managerRef.current?.handleCancelHistorySearch();
|
|
202
195
|
}, []);
|
|
203
196
|
// Memory type selector methods
|
|
204
197
|
const activateMemoryTypeSelector = useCallback((message) => {
|
|
@@ -235,12 +228,6 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
235
228
|
managerRef.current?.setCursorPosition(position);
|
|
236
229
|
}, []);
|
|
237
230
|
// Complex handlers that combine multiple operations
|
|
238
|
-
const handleBashHistoryExecuteAndSend = useCallback((command) => {
|
|
239
|
-
managerRef.current?.handleBashHistoryExecuteAndSend(command);
|
|
240
|
-
}, []);
|
|
241
|
-
const handleBashHistoryDelete = useCallback((command, workdir) => {
|
|
242
|
-
managerRef.current?.handleBashHistoryDelete(command, workdir);
|
|
243
|
-
}, []);
|
|
244
231
|
return {
|
|
245
232
|
// State
|
|
246
233
|
inputText,
|
|
@@ -252,13 +239,13 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
252
239
|
showCommandSelector: commandSelectorState.show,
|
|
253
240
|
commandSearchQuery: commandSelectorState.query,
|
|
254
241
|
slashPosition: commandSelectorState.position,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
exclamationPosition: bashHistorySelectorState.position,
|
|
242
|
+
showHistorySearch: historySearchState.show,
|
|
243
|
+
historySearchQuery: historySearchState.query,
|
|
258
244
|
showMemoryTypeSelector: memoryTypeSelectorState.show,
|
|
259
245
|
memoryMessage: memoryTypeSelectorState.message,
|
|
260
|
-
|
|
246
|
+
showTaskManager,
|
|
261
247
|
showMcpManager,
|
|
248
|
+
showRewindManager,
|
|
262
249
|
permissionMode,
|
|
263
250
|
attachedImages,
|
|
264
251
|
isManagerReady,
|
|
@@ -283,13 +270,9 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
283
270
|
handleCancelCommandSelect,
|
|
284
271
|
updateCommandSearchQuery,
|
|
285
272
|
checkForSlashDeletion,
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
handleCancelBashHistorySelect,
|
|
290
|
-
updateBashHistorySearchQuery,
|
|
291
|
-
handleBashHistoryExecute,
|
|
292
|
-
checkForExclamationDeletion,
|
|
273
|
+
// History search
|
|
274
|
+
handleHistorySearchSelect,
|
|
275
|
+
handleCancelHistorySearch,
|
|
293
276
|
// Memory type selector
|
|
294
277
|
activateMemoryTypeSelector,
|
|
295
278
|
handleMemoryTypeSelect,
|
|
@@ -301,12 +284,16 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
301
284
|
// Special handling
|
|
302
285
|
handleSpecialCharInput,
|
|
303
286
|
// Bash/MCP Manager
|
|
304
|
-
|
|
305
|
-
managerRef.current?.
|
|
287
|
+
setShowTaskManager: useCallback((show) => {
|
|
288
|
+
managerRef.current?.setShowTaskManager(show);
|
|
306
289
|
}, []),
|
|
307
290
|
setShowMcpManager: useCallback((show) => {
|
|
308
291
|
managerRef.current?.setShowMcpManager(show);
|
|
309
292
|
}, []),
|
|
293
|
+
setShowRewindManager: useCallback((show) => {
|
|
294
|
+
managerRef.current?.setShowRewindManager(show);
|
|
295
|
+
setShowRewindManager(show);
|
|
296
|
+
}, []),
|
|
310
297
|
setPermissionMode: useCallback((mode) => {
|
|
311
298
|
setPermissionModeState(mode);
|
|
312
299
|
managerRef.current?.setPermissionMode(mode);
|
|
@@ -337,9 +324,6 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
337
324
|
clearLongTextMap: useCallback(() => {
|
|
338
325
|
managerRef.current?.clearLongTextMap();
|
|
339
326
|
}, []),
|
|
340
|
-
// Complex handlers combining multiple operations
|
|
341
|
-
handleBashHistoryExecuteAndSend,
|
|
342
|
-
handleBashHistoryDelete,
|
|
343
327
|
// Main input handler
|
|
344
328
|
handleInput: useCallback(async (input, key, attachedImages, isLoading = false, isCommandRunning = false, clearImages) => {
|
|
345
329
|
return ((await managerRef.current?.handleInput(input, key, attachedImages, isLoading, isCommandRunning, clearImages)) || false);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePluginManager.d.ts","sourceRoot":"","sources":["../../src/hooks/usePluginManager.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAE7C,wBAAgB,gBAAgB,IAAI,wBAAwB,CA6R3D"}
|