wave-code 0.14.4 → 0.15.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/acp/agent.d.ts.map +1 -1
- package/dist/acp/agent.js +10 -0
- package/dist/components/BackgroundTaskManager.d.ts.map +1 -1
- package/dist/components/BackgroundTaskManager.js +17 -53
- package/dist/components/CommandSelector.d.ts.map +1 -1
- package/dist/components/CommandSelector.js +38 -28
- package/dist/components/ConfirmationSelector.d.ts.map +1 -1
- package/dist/components/ConfirmationSelector.js +18 -196
- package/dist/components/DiscoverView.d.ts.map +1 -1
- package/dist/components/DiscoverView.js +19 -11
- package/dist/components/FileSelector.d.ts.map +1 -1
- package/dist/components/FileSelector.js +29 -25
- package/dist/components/HelpView.d.ts.map +1 -1
- package/dist/components/HelpView.js +24 -28
- package/dist/components/HistorySearch.d.ts.map +1 -1
- package/dist/components/HistorySearch.js +26 -28
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +14 -6
- package/dist/components/InstalledView.d.ts.map +1 -1
- package/dist/components/InstalledView.js +19 -11
- package/dist/components/MarketplaceDetail.d.ts.map +1 -1
- package/dist/components/MarketplaceDetail.js +35 -16
- package/dist/components/MarketplaceView.d.ts.map +1 -1
- package/dist/components/MarketplaceView.js +21 -12
- package/dist/components/McpManager.d.ts.map +1 -1
- package/dist/components/McpManager.js +27 -46
- package/dist/components/ModelSelector.d.ts.map +1 -1
- package/dist/components/ModelSelector.js +27 -17
- package/dist/components/PluginDetail.d.ts.map +1 -1
- package/dist/components/PluginDetail.js +39 -26
- package/dist/components/RewindCommand.d.ts.map +1 -1
- package/dist/components/RewindCommand.js +27 -21
- package/dist/components/SessionSelector.d.ts.map +1 -1
- package/dist/components/SessionSelector.js +21 -16
- package/dist/components/StatusLine.d.ts.map +1 -1
- package/dist/components/StatusLine.js +5 -1
- package/dist/components/WorktreeExitPrompt.d.ts.map +1 -1
- package/dist/components/WorktreeExitPrompt.js +21 -12
- package/dist/contexts/useChat.d.ts +0 -1
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +13 -20
- package/dist/hooks/useInputManager.d.ts +5 -19
- package/dist/hooks/useInputManager.d.ts.map +1 -1
- package/dist/hooks/useInputManager.js +224 -79
- package/dist/managers/inputHandlers.d.ts +1 -1
- package/dist/managers/inputHandlers.d.ts.map +1 -1
- package/dist/managers/inputHandlers.js +3 -6
- package/dist/managers/inputReducer.d.ts +50 -4
- package/dist/managers/inputReducer.d.ts.map +1 -1
- package/dist/managers/inputReducer.js +519 -4
- package/dist/print-cli.d.ts.map +1 -1
- package/dist/print-cli.js +17 -9
- package/dist/reducers/backgroundTaskManagerReducer.d.ts +20 -0
- package/dist/reducers/backgroundTaskManagerReducer.d.ts.map +1 -1
- package/dist/reducers/backgroundTaskManagerReducer.js +83 -0
- package/dist/reducers/confirmationReducer.d.ts +11 -0
- package/dist/reducers/confirmationReducer.d.ts.map +1 -1
- package/dist/reducers/confirmationReducer.js +146 -0
- package/dist/reducers/helpSelectorReducer.d.ts +26 -0
- package/dist/reducers/helpSelectorReducer.d.ts.map +1 -0
- package/dist/reducers/helpSelectorReducer.js +52 -0
- package/dist/reducers/mcpManagerReducer.d.ts +22 -0
- package/dist/reducers/mcpManagerReducer.d.ts.map +1 -1
- package/dist/reducers/mcpManagerReducer.js +57 -0
- package/dist/reducers/pluginDetailReducer.d.ts +8 -0
- package/dist/reducers/pluginDetailReducer.d.ts.map +1 -1
- package/dist/reducers/pluginDetailReducer.js +32 -0
- package/dist/reducers/questionReducer.d.ts +21 -0
- package/dist/reducers/questionReducer.d.ts.map +1 -1
- package/dist/reducers/questionReducer.js +177 -0
- package/dist/reducers/rewindSelectorReducer.d.ts +22 -0
- package/dist/reducers/rewindSelectorReducer.d.ts.map +1 -0
- package/dist/reducers/rewindSelectorReducer.js +37 -0
- package/dist/reducers/selectorReducer.d.ts +22 -0
- package/dist/reducers/selectorReducer.d.ts.map +1 -0
- package/dist/reducers/selectorReducer.js +40 -0
- package/dist/utils/inputUtils.d.ts +18 -0
- package/dist/utils/inputUtils.d.ts.map +1 -0
- package/dist/utils/inputUtils.js +67 -0
- package/dist/utils/worktree.d.ts.map +1 -1
- package/dist/utils/worktree.js +1 -2
- package/package.json +2 -2
- package/src/acp/agent.ts +10 -0
- package/src/components/BackgroundTaskManager.tsx +19 -58
- package/src/components/CommandSelector.tsx +53 -44
- package/src/components/ConfirmationSelector.tsx +18 -202
- package/src/components/DiscoverView.tsx +21 -11
- package/src/components/FileSelector.tsx +40 -35
- package/src/components/HelpView.tsx +37 -43
- package/src/components/HistorySearch.tsx +29 -36
- package/src/components/InputBox.tsx +14 -7
- package/src/components/InstalledView.tsx +21 -11
- package/src/components/MarketplaceDetail.tsx +48 -24
- package/src/components/MarketplaceView.tsx +25 -10
- package/src/components/McpManager.tsx +29 -54
- package/src/components/ModelSelector.tsx +30 -23
- package/src/components/PluginDetail.tsx +50 -27
- package/src/components/RewindCommand.tsx +38 -32
- package/src/components/SessionSelector.tsx +23 -20
- package/src/components/StatusLine.tsx +10 -1
- package/src/components/WorktreeExitPrompt.tsx +23 -13
- package/src/contexts/useChat.tsx +13 -31
- package/src/hooks/useInputManager.ts +275 -141
- package/src/managers/inputHandlers.ts +1 -6
- package/src/managers/inputReducer.ts +680 -7
- package/src/print-cli.ts +15 -11
- package/src/reducers/backgroundTaskManagerReducer.ts +110 -1
- package/src/reducers/confirmationReducer.ts +173 -1
- package/src/reducers/helpSelectorReducer.ts +77 -0
- package/src/reducers/mcpManagerReducer.ts +82 -1
- package/src/reducers/pluginDetailReducer.ts +42 -1
- package/src/reducers/questionReducer.ts +204 -0
- package/src/reducers/rewindSelectorReducer.ts +54 -0
- package/src/reducers/selectorReducer.ts +57 -0
- package/src/utils/inputUtils.ts +94 -0
- package/src/utils/worktree.ts +1 -7
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { useEffect, useReducer, useCallback
|
|
1
|
+
import { useEffect, useReducer, useCallback } from "react";
|
|
2
2
|
import { inputReducer, initialState, } from "../managers/inputReducer.js";
|
|
3
|
-
import { searchFiles as searchFilesUtil, } from "wave-agent-sdk";
|
|
3
|
+
import { searchFiles as searchFilesUtil, PromptHistoryManager, } from "wave-agent-sdk";
|
|
4
4
|
import * as handlers from "../managers/inputHandlers.js";
|
|
5
5
|
export const useInputManager = (callbacks = {}) => {
|
|
6
6
|
const [state, dispatch] = useReducer(inputReducer, initialState);
|
|
7
|
-
const
|
|
8
|
-
const stateRef = useRef(state);
|
|
9
|
-
// Update refs when they change
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
callbacksRef.current = callbacks;
|
|
12
|
-
}, [callbacks]);
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
stateRef.current = state;
|
|
15
|
-
}, [state]);
|
|
7
|
+
const { onInputTextChange, onCursorPositionChange, onFileSelectorStateChange, onCommandSelectorStateChange, onHistorySearchStateChange, onBackgroundTaskManagerStateChange, onMcpManagerStateChange, onRewindManagerStateChange, onHelpStateChange, onStatusCommandStateChange, onPluginManagerStateChange, onModelSelectorStateChange, onImagesStateChange, onSendMessage, onHasSlashCommand, onAbortMessage, onBackgroundCurrentTask, onPermissionModeChange, onAskBtw, sessionId, workdir, getFullMessageThread, logger, } = callbacks;
|
|
16
8
|
// Handle selectorJustUsed reset
|
|
17
9
|
useEffect(() => {
|
|
18
10
|
if (state.selectorJustUsed) {
|
|
@@ -46,7 +38,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
46
38
|
if (state.isPasting) {
|
|
47
39
|
const pasteDebounceDelay = parseInt(process.env.PASTE_DEBOUNCE_MS || "30", 10);
|
|
48
40
|
const timer = setTimeout(() => {
|
|
49
|
-
const processedInput =
|
|
41
|
+
const processedInput = state.pasteBuffer.replace(/\r/g, "\n");
|
|
50
42
|
dispatch({
|
|
51
43
|
type: "INSERT_TEXT_WITH_PLACEHOLDER",
|
|
52
44
|
payload: processedInput,
|
|
@@ -59,53 +51,198 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
59
51
|
}, [state.isPasting, state.pasteBuffer]);
|
|
60
52
|
// Sync state changes with callbacks
|
|
61
53
|
useEffect(() => {
|
|
62
|
-
|
|
63
|
-
}, [state.inputText]);
|
|
54
|
+
onInputTextChange?.(state.inputText);
|
|
55
|
+
}, [state.inputText, onInputTextChange]);
|
|
64
56
|
useEffect(() => {
|
|
65
|
-
|
|
66
|
-
}, [state.cursorPosition]);
|
|
57
|
+
onCursorPositionChange?.(state.cursorPosition);
|
|
58
|
+
}, [state.cursorPosition, onCursorPositionChange]);
|
|
59
|
+
// Handle pending effects
|
|
67
60
|
useEffect(() => {
|
|
68
|
-
|
|
61
|
+
if (!state.pendingEffect)
|
|
62
|
+
return;
|
|
63
|
+
const effect = state.pendingEffect;
|
|
64
|
+
dispatch({ type: "CLEAR_PENDING_EFFECT" });
|
|
65
|
+
const runEffect = async () => {
|
|
66
|
+
try {
|
|
67
|
+
switch (effect.type) {
|
|
68
|
+
case "SEND_MESSAGE":
|
|
69
|
+
await onSendMessage?.(effect.content, effect.images, effect.longTextMap);
|
|
70
|
+
break;
|
|
71
|
+
case "ABORT_MESSAGE":
|
|
72
|
+
onAbortMessage?.();
|
|
73
|
+
break;
|
|
74
|
+
case "BACKGROUND_CURRENT_TASK":
|
|
75
|
+
onBackgroundCurrentTask?.();
|
|
76
|
+
break;
|
|
77
|
+
case "ASK_BTW":
|
|
78
|
+
try {
|
|
79
|
+
const answer = await onAskBtw?.(effect.question);
|
|
80
|
+
dispatch({
|
|
81
|
+
type: "SET_BTW_STATE",
|
|
82
|
+
payload: { answer, isLoading: false },
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
console.error("Failed to ask side question:", error);
|
|
87
|
+
dispatch({
|
|
88
|
+
type: "SET_BTW_STATE",
|
|
89
|
+
payload: {
|
|
90
|
+
answer: "Error: Failed to get an answer for your side question.",
|
|
91
|
+
isLoading: false,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "PERMISSION_MODE_CHANGE":
|
|
97
|
+
onPermissionModeChange?.(effect.mode);
|
|
98
|
+
break;
|
|
99
|
+
case "SAVE_HISTORY":
|
|
100
|
+
PromptHistoryManager.addEntry(effect.content, sessionId, effect.longTextMap, workdir).catch((err) => {
|
|
101
|
+
logger?.error("Failed to save prompt history", err);
|
|
102
|
+
});
|
|
103
|
+
break;
|
|
104
|
+
case "FETCH_HISTORY": {
|
|
105
|
+
let sessionIds = sessionId
|
|
106
|
+
? [sessionId]
|
|
107
|
+
: undefined;
|
|
108
|
+
if (getFullMessageThread) {
|
|
109
|
+
try {
|
|
110
|
+
const thread = await getFullMessageThread();
|
|
111
|
+
sessionIds = thread.sessionIds;
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
logger?.error("Failed to fetch ancestor session IDs", error);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const history = await PromptHistoryManager.getHistory({
|
|
118
|
+
sessionId: sessionIds,
|
|
119
|
+
workdir: workdir,
|
|
120
|
+
});
|
|
121
|
+
dispatch({ type: "SET_HISTORY_ENTRIES", payload: history });
|
|
122
|
+
dispatch({ type: "NAVIGATE_HISTORY", payload: "up" });
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case "PASTE_IMAGE":
|
|
126
|
+
try {
|
|
127
|
+
await handlers.handlePasteImage(dispatch);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.warn("Failed to handle paste image:", error);
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case "EXECUTE_COMMAND":
|
|
134
|
+
if (onSendMessage && onHasSlashCommand?.(effect.command)) {
|
|
135
|
+
const fullCommand = `/${effect.command}`;
|
|
136
|
+
try {
|
|
137
|
+
await onSendMessage(fullCommand, undefined, {});
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
console.error("Failed to execute slash command:", error);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
// Internal command handling
|
|
145
|
+
const command = effect.command;
|
|
146
|
+
if (command === "tasks") {
|
|
147
|
+
dispatch({
|
|
148
|
+
type: "SET_SHOW_BACKGROUND_TASK_MANAGER",
|
|
149
|
+
payload: true,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else if (command === "mcp") {
|
|
153
|
+
dispatch({ type: "SET_SHOW_MCP_MANAGER", payload: true });
|
|
154
|
+
}
|
|
155
|
+
else if (command === "rewind") {
|
|
156
|
+
dispatch({ type: "SET_SHOW_REWIND_MANAGER", payload: true });
|
|
157
|
+
}
|
|
158
|
+
else if (command === "help") {
|
|
159
|
+
dispatch({ type: "SET_SHOW_HELP", payload: true });
|
|
160
|
+
}
|
|
161
|
+
else if (command === "status") {
|
|
162
|
+
dispatch({ type: "SET_SHOW_STATUS_COMMAND", payload: true });
|
|
163
|
+
}
|
|
164
|
+
else if (command === "plugin") {
|
|
165
|
+
dispatch({ type: "SET_SHOW_PLUGIN_MANAGER", payload: true });
|
|
166
|
+
}
|
|
167
|
+
else if (command === "model") {
|
|
168
|
+
dispatch({ type: "SET_SHOW_MODEL_SELECTOR", payload: true });
|
|
169
|
+
}
|
|
170
|
+
else if (command === "btw") {
|
|
171
|
+
dispatch({
|
|
172
|
+
type: "SET_BTW_STATE",
|
|
173
|
+
payload: { isActive: true, question: "", isLoading: false },
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
console.error("Effect execution error:", error);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
runEffect();
|
|
185
|
+
}, [
|
|
186
|
+
state.pendingEffect,
|
|
187
|
+
onSendMessage,
|
|
188
|
+
onAbortMessage,
|
|
189
|
+
onBackgroundCurrentTask,
|
|
190
|
+
onAskBtw,
|
|
191
|
+
onPermissionModeChange,
|
|
192
|
+
sessionId,
|
|
193
|
+
workdir,
|
|
194
|
+
getFullMessageThread,
|
|
195
|
+
logger,
|
|
196
|
+
onHasSlashCommand,
|
|
197
|
+
]);
|
|
198
|
+
useEffect(() => {
|
|
199
|
+
onFileSelectorStateChange?.(state.showFileSelector, state.filteredFiles, state.fileSearchQuery, state.atPosition);
|
|
69
200
|
}, [
|
|
70
201
|
state.showFileSelector,
|
|
71
202
|
state.filteredFiles,
|
|
72
203
|
state.fileSearchQuery,
|
|
73
204
|
state.atPosition,
|
|
205
|
+
onFileSelectorStateChange,
|
|
74
206
|
]);
|
|
75
207
|
useEffect(() => {
|
|
76
|
-
|
|
208
|
+
onCommandSelectorStateChange?.(state.showCommandSelector, state.commandSearchQuery, state.slashPosition);
|
|
77
209
|
}, [
|
|
78
210
|
state.showCommandSelector,
|
|
79
211
|
state.commandSearchQuery,
|
|
80
212
|
state.slashPosition,
|
|
213
|
+
onCommandSelectorStateChange,
|
|
81
214
|
]);
|
|
82
215
|
useEffect(() => {
|
|
83
|
-
|
|
84
|
-
}, [
|
|
216
|
+
onHistorySearchStateChange?.(state.showHistorySearch, state.historySearchQuery);
|
|
217
|
+
}, [
|
|
218
|
+
state.showHistorySearch,
|
|
219
|
+
state.historySearchQuery,
|
|
220
|
+
onHistorySearchStateChange,
|
|
221
|
+
]);
|
|
85
222
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
-
}, [state.showBackgroundTaskManager]);
|
|
223
|
+
onBackgroundTaskManagerStateChange?.(state.showBackgroundTaskManager);
|
|
224
|
+
}, [state.showBackgroundTaskManager, onBackgroundTaskManagerStateChange]);
|
|
88
225
|
useEffect(() => {
|
|
89
|
-
|
|
90
|
-
}, [state.showMcpManager]);
|
|
226
|
+
onMcpManagerStateChange?.(state.showMcpManager);
|
|
227
|
+
}, [state.showMcpManager, onMcpManagerStateChange]);
|
|
91
228
|
useEffect(() => {
|
|
92
|
-
|
|
93
|
-
}, [state.showRewindManager]);
|
|
229
|
+
onRewindManagerStateChange?.(state.showRewindManager);
|
|
230
|
+
}, [state.showRewindManager, onRewindManagerStateChange]);
|
|
94
231
|
useEffect(() => {
|
|
95
|
-
|
|
96
|
-
}, [state.showHelp]);
|
|
232
|
+
onHelpStateChange?.(state.showHelp);
|
|
233
|
+
}, [state.showHelp, onHelpStateChange]);
|
|
97
234
|
useEffect(() => {
|
|
98
|
-
|
|
99
|
-
}, [state.showStatusCommand]);
|
|
235
|
+
onStatusCommandStateChange?.(state.showStatusCommand);
|
|
236
|
+
}, [state.showStatusCommand, onStatusCommandStateChange]);
|
|
100
237
|
useEffect(() => {
|
|
101
|
-
|
|
102
|
-
}, [state.showPluginManager]);
|
|
238
|
+
onPluginManagerStateChange?.(state.showPluginManager);
|
|
239
|
+
}, [state.showPluginManager, onPluginManagerStateChange]);
|
|
103
240
|
useEffect(() => {
|
|
104
|
-
|
|
105
|
-
}, [state.showModelSelector]);
|
|
241
|
+
onModelSelectorStateChange?.(state.showModelSelector);
|
|
242
|
+
}, [state.showModelSelector, onModelSelectorStateChange]);
|
|
106
243
|
useEffect(() => {
|
|
107
|
-
|
|
108
|
-
}, [state.attachedImages]);
|
|
244
|
+
onImagesStateChange?.(state.attachedImages);
|
|
245
|
+
}, [state.attachedImages, onImagesStateChange]);
|
|
109
246
|
// Handle /btw side question
|
|
110
247
|
useEffect(() => {
|
|
111
248
|
if (state.btwState.isActive &&
|
|
@@ -113,7 +250,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
113
250
|
state.btwState.question) {
|
|
114
251
|
const askBtw = async () => {
|
|
115
252
|
try {
|
|
116
|
-
const answer = await
|
|
253
|
+
const answer = await onAskBtw?.(state.btwState.question);
|
|
117
254
|
dispatch({
|
|
118
255
|
type: "SET_BTW_STATE",
|
|
119
256
|
payload: { answer, isLoading: false },
|
|
@@ -136,6 +273,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
136
273
|
state.btwState.isActive,
|
|
137
274
|
state.btwState.isLoading,
|
|
138
275
|
state.btwState.question,
|
|
276
|
+
onAskBtw,
|
|
139
277
|
]);
|
|
140
278
|
// Methods
|
|
141
279
|
const insertTextAtCursor = useCallback((text) => {
|
|
@@ -157,7 +295,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
157
295
|
dispatch({ type: "ACTIVATE_FILE_SELECTOR", payload: position });
|
|
158
296
|
}, []);
|
|
159
297
|
const handleFileSelect = useCallback((filePath) => {
|
|
160
|
-
|
|
298
|
+
dispatch({ type: "SELECT_FILE", payload: filePath });
|
|
161
299
|
}, []);
|
|
162
300
|
const handleCancelFileSelect = useCallback(() => {
|
|
163
301
|
dispatch({ type: "CANCEL_FILE_SELECTOR" });
|
|
@@ -166,33 +304,18 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
166
304
|
dispatch({ type: "SET_FILE_SEARCH_QUERY", payload: query });
|
|
167
305
|
}, []);
|
|
168
306
|
const checkForAtDeletion = useCallback((cursorPos) => {
|
|
169
|
-
|
|
170
|
-
|
|
307
|
+
// This is now largely handled inside HANDLE_KEY,
|
|
308
|
+
// but kept for external calls if any.
|
|
309
|
+
return handlers.checkForAtDeletion(state, dispatch, cursorPos);
|
|
310
|
+
}, [state]);
|
|
171
311
|
const activateCommandSelector = useCallback((position) => {
|
|
172
312
|
dispatch({ type: "ACTIVATE_COMMAND_SELECTOR", payload: position });
|
|
173
313
|
}, []);
|
|
174
314
|
const handleCommandSelect = useCallback((command) => {
|
|
175
|
-
|
|
315
|
+
dispatch({ type: "SELECT_COMMAND", payload: command });
|
|
176
316
|
}, []);
|
|
177
317
|
const handleCommandInsert = useCallback((command) => {
|
|
178
|
-
|
|
179
|
-
if (currentState.slashPosition >= 0) {
|
|
180
|
-
const wordEnd = handlers.getWordEnd(currentState.inputText, currentState.slashPosition);
|
|
181
|
-
const beforeSlash = currentState.inputText.substring(0, currentState.slashPosition);
|
|
182
|
-
const afterWord = currentState.inputText.substring(wordEnd);
|
|
183
|
-
const newInput = beforeSlash + `/${command} ` + afterWord;
|
|
184
|
-
const newCursorPosition = beforeSlash.length + command.length + 2;
|
|
185
|
-
dispatch({ type: "SET_INPUT_TEXT", payload: newInput });
|
|
186
|
-
dispatch({ type: "SET_CURSOR_POSITION", payload: newCursorPosition });
|
|
187
|
-
dispatch({ type: "CANCEL_COMMAND_SELECTOR" });
|
|
188
|
-
callbacksRef.current.onInputTextChange?.(newInput);
|
|
189
|
-
callbacksRef.current.onCursorPositionChange?.(newCursorPosition);
|
|
190
|
-
return { newInput, newCursorPosition };
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
newInput: currentState.inputText,
|
|
194
|
-
newCursorPosition: currentState.cursorPosition,
|
|
195
|
-
};
|
|
318
|
+
dispatch({ type: "INSERT_COMMAND", payload: command });
|
|
196
319
|
}, []);
|
|
197
320
|
const handleCancelCommandSelect = useCallback(() => {
|
|
198
321
|
dispatch({ type: "CANCEL_COMMAND_SELECTOR" });
|
|
@@ -201,8 +324,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
201
324
|
dispatch({ type: "SET_COMMAND_SEARCH_QUERY", payload: query });
|
|
202
325
|
}, []);
|
|
203
326
|
const checkForSlashDeletion = useCallback((cursorPos) => {
|
|
204
|
-
return handlers.checkForSlashDeletion(
|
|
205
|
-
}, []);
|
|
327
|
+
return handlers.checkForSlashDeletion(state, dispatch, cursorPos);
|
|
328
|
+
}, [state]);
|
|
206
329
|
const handleHistorySearchSelect = useCallback((entry) => {
|
|
207
330
|
dispatch({ type: "SELECT_HISTORY_ENTRY", payload: entry });
|
|
208
331
|
}, []);
|
|
@@ -210,8 +333,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
210
333
|
dispatch({ type: "CANCEL_HISTORY_SEARCH" });
|
|
211
334
|
}, []);
|
|
212
335
|
const processSelectorInput = useCallback((char) => {
|
|
213
|
-
handlers.processSelectorInput(
|
|
214
|
-
}, []);
|
|
336
|
+
handlers.processSelectorInput(state, dispatch, char);
|
|
337
|
+
}, [state]);
|
|
215
338
|
const setInputText = useCallback((text) => {
|
|
216
339
|
dispatch({ type: "SET_INPUT_TEXT", payload: text });
|
|
217
340
|
}, []);
|
|
@@ -241,11 +364,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
241
364
|
}, []);
|
|
242
365
|
const setPermissionMode = useCallback((mode) => {
|
|
243
366
|
dispatch({ type: "SET_PERMISSION_MODE", payload: mode });
|
|
244
|
-
|
|
245
|
-
}, []);
|
|
246
|
-
const setAllowBypassInCycle = useCallback((allow) => {
|
|
247
|
-
dispatch({ type: "SET_ALLOW_BYPASS_IN_CYCLE", payload: allow });
|
|
248
|
-
}, []);
|
|
367
|
+
onPermissionModeChange?.(mode);
|
|
368
|
+
}, [onPermissionModeChange]);
|
|
249
369
|
const setBtwState = useCallback((payload) => {
|
|
250
370
|
dispatch({ type: "SET_BTW_STATE", payload });
|
|
251
371
|
}, []);
|
|
@@ -262,20 +382,46 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
262
382
|
return await handlers.handlePasteImage(dispatch);
|
|
263
383
|
}, []);
|
|
264
384
|
const handlePasteInput = useCallback((input) => {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
385
|
+
dispatch({
|
|
386
|
+
type: "HANDLE_KEY",
|
|
387
|
+
payload: {
|
|
388
|
+
input,
|
|
389
|
+
key: {},
|
|
390
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
}, [onHasSlashCommand]);
|
|
394
|
+
const handleSubmit = useCallback(async () => {
|
|
395
|
+
dispatch({
|
|
396
|
+
type: "HANDLE_KEY",
|
|
397
|
+
payload: {
|
|
398
|
+
input: "",
|
|
399
|
+
key: { return: true },
|
|
400
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
401
|
+
},
|
|
402
|
+
});
|
|
403
|
+
}, [onHasSlashCommand]);
|
|
270
404
|
const expandLongTextPlaceholders = useCallback((text) => {
|
|
271
|
-
return handlers.expandLongTextPlaceholders(text,
|
|
272
|
-
}, []);
|
|
405
|
+
return handlers.expandLongTextPlaceholders(text, state.longTextMap);
|
|
406
|
+
}, [state.longTextMap]);
|
|
273
407
|
const clearLongTextMap = useCallback(() => {
|
|
274
408
|
dispatch({ type: "CLEAR_LONG_TEXT_MAP" });
|
|
275
409
|
}, []);
|
|
276
|
-
const handleInput = useCallback(async (input, key,
|
|
277
|
-
|
|
278
|
-
|
|
410
|
+
const handleInput = useCallback(async (input, key, _attachedImages, clearImages) => {
|
|
411
|
+
// Clear images side effect if return is pressed
|
|
412
|
+
if (key.return) {
|
|
413
|
+
clearImages?.();
|
|
414
|
+
}
|
|
415
|
+
dispatch({
|
|
416
|
+
type: "HANDLE_KEY",
|
|
417
|
+
payload: {
|
|
418
|
+
input,
|
|
419
|
+
key,
|
|
420
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
421
|
+
},
|
|
422
|
+
});
|
|
423
|
+
return true;
|
|
424
|
+
}, [onHasSlashCommand]);
|
|
279
425
|
return {
|
|
280
426
|
// State
|
|
281
427
|
inputText: state.inputText,
|
|
@@ -334,7 +480,6 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
334
480
|
setShowPluginManager,
|
|
335
481
|
setShowModelSelector,
|
|
336
482
|
setPermissionMode,
|
|
337
|
-
setAllowBypassInCycle,
|
|
338
483
|
setBtwState,
|
|
339
484
|
// Image management
|
|
340
485
|
addImage,
|
|
@@ -8,7 +8,7 @@ export declare const handleSubmit: (state: InputState, dispatch: React.Dispatch<
|
|
|
8
8
|
mimeType: string;
|
|
9
9
|
}>) => Promise<void>;
|
|
10
10
|
export declare const handlePasteImage: (dispatch: React.Dispatch<InputAction>) => Promise<boolean>;
|
|
11
|
-
export declare const cyclePermissionMode: (currentMode: PermissionMode, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks
|
|
11
|
+
export declare const cyclePermissionMode: (currentMode: PermissionMode, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>) => void;
|
|
12
12
|
export declare const getAtSelectorPosition: (text: string, cursorPosition: number) => number;
|
|
13
13
|
export declare const getSlashSelectorPosition: (text: string, cursorPosition: number) => number;
|
|
14
14
|
export declare const updateSearchQueriesForActiveSelectors: (state: InputState, dispatch: React.Dispatch<InputAction>, inputText: string, cursorPosition: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputHandlers.d.ts","sourceRoot":"","sources":["../../src/managers/inputHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAwB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EACL,UAAU,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,0BAA0B,GACrC,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAClC,MAcF,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,OAAO,UAAU,EACjB,UAAU,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EACrC,WAAW,OAAO,CAAC,qBAAqB,CAAC,EACzC,yBAAyB,KAAK,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,KACD,OAAO,CAAC,IAAI,CA8Dd,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,UAAU,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KACpC,OAAO,CAAC,OAAO,CAiBjB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,aAAa,cAAc,EAC3B,UAAU,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EACrC,WAAW,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"input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AC,QAAQ,CAAC,WAAW,CAAC,EACrC,WAAW,OAAO,CAAC,qBAAqB,CAAC,EACzC,OAAO,MAAM,EACb,KAAK,GAAG,EACR,cAAc,MAAM,IAAI,KACvB,OAAO,CAAC,OAAO,CA8JjB,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,OAAO,UAAU,EACjB,UAAU,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EACrC,WAAW,OAAO,CAAC,qBAAqB,CAAC,EACzC,OAAO,MAAM,EACb,KAAK,GAAG,EACR,cAAc,MAAM,IAAI,KACvB,OAAO,CAAC,OAAO,CAwIjB,CAAC"}
|
|
@@ -73,11 +73,8 @@ export const handlePasteImage = async (dispatch) => {
|
|
|
73
73
|
return false;
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
export const cyclePermissionMode = (currentMode, dispatch, callbacks
|
|
77
|
-
const modes = ["default", "acceptEdits", "plan"];
|
|
78
|
-
if (allowBypassInCycle) {
|
|
79
|
-
modes.push("bypassPermissions");
|
|
80
|
-
}
|
|
76
|
+
export const cyclePermissionMode = (currentMode, dispatch, callbacks) => {
|
|
77
|
+
const modes = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
81
78
|
const currentIndex = modes.indexOf(currentMode);
|
|
82
79
|
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % modes.length;
|
|
83
80
|
const nextMode = modes[nextIndex];
|
|
@@ -552,7 +549,7 @@ export const handleInput = async (state, dispatch, callbacks, input, key, clearI
|
|
|
552
549
|
}
|
|
553
550
|
}
|
|
554
551
|
if (key.tab && key.shift) {
|
|
555
|
-
cyclePermissionMode(state.permissionMode, dispatch, callbacks
|
|
552
|
+
cyclePermissionMode(state.permissionMode, dispatch, callbacks);
|
|
556
553
|
return true;
|
|
557
554
|
}
|
|
558
555
|
if (state.showFileSelector ||
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FileItem, PermissionMode, Logger, PromptEntry, Message } from "wave-agent-sdk";
|
|
2
|
+
import { Key } from "ink";
|
|
2
3
|
export interface AttachedImage {
|
|
3
4
|
id: number;
|
|
4
5
|
path: string;
|
|
@@ -10,6 +11,36 @@ export interface BtwState {
|
|
|
10
11
|
answer?: string;
|
|
11
12
|
isLoading: boolean;
|
|
12
13
|
}
|
|
14
|
+
export type PendingEffect = {
|
|
15
|
+
type: "SEND_MESSAGE";
|
|
16
|
+
content: string;
|
|
17
|
+
images?: Array<{
|
|
18
|
+
path: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
}>;
|
|
21
|
+
longTextMap: Record<string, string>;
|
|
22
|
+
} | {
|
|
23
|
+
type: "ABORT_MESSAGE";
|
|
24
|
+
} | {
|
|
25
|
+
type: "BACKGROUND_CURRENT_TASK";
|
|
26
|
+
} | {
|
|
27
|
+
type: "ASK_BTW";
|
|
28
|
+
question: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "PERMISSION_MODE_CHANGE";
|
|
31
|
+
mode: PermissionMode;
|
|
32
|
+
} | {
|
|
33
|
+
type: "SAVE_HISTORY";
|
|
34
|
+
content: string;
|
|
35
|
+
longTextMap: Record<string, string>;
|
|
36
|
+
} | {
|
|
37
|
+
type: "FETCH_HISTORY";
|
|
38
|
+
} | {
|
|
39
|
+
type: "PASTE_IMAGE";
|
|
40
|
+
} | {
|
|
41
|
+
type: "EXECUTE_COMMAND";
|
|
42
|
+
command: string;
|
|
43
|
+
};
|
|
13
44
|
export interface InputManagerCallbacks {
|
|
14
45
|
onInputTextChange?: (text: string) => void;
|
|
15
46
|
onCursorPositionChange?: (position: number) => void;
|
|
@@ -65,7 +96,6 @@ export interface InputState {
|
|
|
65
96
|
showPluginManager: boolean;
|
|
66
97
|
showModelSelector: boolean;
|
|
67
98
|
permissionMode: PermissionMode;
|
|
68
|
-
allowBypassInCycle: boolean;
|
|
69
99
|
selectorJustUsed: boolean;
|
|
70
100
|
isPasting: boolean;
|
|
71
101
|
pasteBuffer: string;
|
|
@@ -76,6 +106,7 @@ export interface InputState {
|
|
|
76
106
|
originalLongTextMap: Record<string, string>;
|
|
77
107
|
isFileSearching: boolean;
|
|
78
108
|
btwState: BtwState;
|
|
109
|
+
pendingEffect: PendingEffect | null;
|
|
79
110
|
}
|
|
80
111
|
export declare const initialState: InputState;
|
|
81
112
|
export type InputAction = {
|
|
@@ -153,9 +184,6 @@ export type InputAction = {
|
|
|
153
184
|
} | {
|
|
154
185
|
type: "SET_PERMISSION_MODE";
|
|
155
186
|
payload: PermissionMode;
|
|
156
|
-
} | {
|
|
157
|
-
type: "SET_ALLOW_BYPASS_IN_CYCLE";
|
|
158
|
-
payload: boolean;
|
|
159
187
|
} | {
|
|
160
188
|
type: "SET_SELECTOR_JUST_USED";
|
|
161
189
|
payload: boolean;
|
|
@@ -200,9 +228,27 @@ export type InputAction = {
|
|
|
200
228
|
} | {
|
|
201
229
|
type: "SELECT_HISTORY_ENTRY";
|
|
202
230
|
payload: PromptEntry;
|
|
231
|
+
} | {
|
|
232
|
+
type: "SELECT_COMMAND";
|
|
233
|
+
payload: string;
|
|
234
|
+
} | {
|
|
235
|
+
type: "INSERT_COMMAND";
|
|
236
|
+
payload: string;
|
|
237
|
+
} | {
|
|
238
|
+
type: "SELECT_FILE";
|
|
239
|
+
payload: string;
|
|
203
240
|
} | {
|
|
204
241
|
type: "SET_BTW_STATE";
|
|
205
242
|
payload: Partial<BtwState>;
|
|
243
|
+
} | {
|
|
244
|
+
type: "CLEAR_PENDING_EFFECT";
|
|
245
|
+
} | {
|
|
246
|
+
type: "HANDLE_KEY";
|
|
247
|
+
payload: {
|
|
248
|
+
input: string;
|
|
249
|
+
key: Key;
|
|
250
|
+
hasSlashCommand: (cmd: string) => boolean;
|
|
251
|
+
};
|
|
206
252
|
};
|
|
207
253
|
export declare function inputReducer(state: InputState, action: InputAction): InputState;
|
|
208
254
|
//# sourceMappingURL=inputReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputReducer.d.ts","sourceRoot":"","sources":["../../src/managers/inputReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,WAAW,EACX,OAAO,EACR,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"inputReducer.d.ts","sourceRoot":"","sources":["../../src/managers/inputReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,WAAW,EACX,OAAO,EACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAS1B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GACrB;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,GACD;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,yBAAyB,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GACxD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CA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