wave-code 0.14.4 → 0.15.1
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 +222 -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 +46 -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 +21 -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 +273 -141
- package/src/managers/inputHandlers.ts +1 -6
- package/src/managers/inputReducer.ts +675 -7
- package/src/print-cli.ts +20 -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,196 @@ 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
|
+
PromptHistoryManager.addEntry(effect.content, sessionId, effect.longTextMap, workdir).catch((err) => {
|
|
71
|
+
logger?.error("Failed to save prompt history", err);
|
|
72
|
+
});
|
|
73
|
+
break;
|
|
74
|
+
case "ABORT_MESSAGE":
|
|
75
|
+
onAbortMessage?.();
|
|
76
|
+
break;
|
|
77
|
+
case "BACKGROUND_CURRENT_TASK":
|
|
78
|
+
onBackgroundCurrentTask?.();
|
|
79
|
+
break;
|
|
80
|
+
case "ASK_BTW":
|
|
81
|
+
try {
|
|
82
|
+
const answer = await onAskBtw?.(effect.question);
|
|
83
|
+
dispatch({
|
|
84
|
+
type: "SET_BTW_STATE",
|
|
85
|
+
payload: { answer, isLoading: false },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
console.error("Failed to ask side question:", error);
|
|
90
|
+
dispatch({
|
|
91
|
+
type: "SET_BTW_STATE",
|
|
92
|
+
payload: {
|
|
93
|
+
answer: "Error: Failed to get an answer for your side question.",
|
|
94
|
+
isLoading: false,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "PERMISSION_MODE_CHANGE":
|
|
100
|
+
onPermissionModeChange?.(effect.mode);
|
|
101
|
+
break;
|
|
102
|
+
case "FETCH_HISTORY": {
|
|
103
|
+
let sessionIds = sessionId
|
|
104
|
+
? [sessionId]
|
|
105
|
+
: undefined;
|
|
106
|
+
if (getFullMessageThread) {
|
|
107
|
+
try {
|
|
108
|
+
const thread = await getFullMessageThread();
|
|
109
|
+
sessionIds = thread.sessionIds;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
logger?.error("Failed to fetch ancestor session IDs", error);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const history = await PromptHistoryManager.getHistory({
|
|
116
|
+
sessionId: sessionIds,
|
|
117
|
+
workdir: workdir,
|
|
118
|
+
});
|
|
119
|
+
dispatch({ type: "SET_HISTORY_ENTRIES", payload: history });
|
|
120
|
+
dispatch({ type: "NAVIGATE_HISTORY", payload: "up" });
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case "PASTE_IMAGE":
|
|
124
|
+
try {
|
|
125
|
+
await handlers.handlePasteImage(dispatch);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
console.warn("Failed to handle paste image:", error);
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case "EXECUTE_COMMAND":
|
|
132
|
+
if (onSendMessage && onHasSlashCommand?.(effect.command)) {
|
|
133
|
+
const fullCommand = `/${effect.command}`;
|
|
134
|
+
try {
|
|
135
|
+
await onSendMessage(fullCommand, undefined, {});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
console.error("Failed to execute slash command:", error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
// Internal command handling
|
|
143
|
+
const command = effect.command;
|
|
144
|
+
if (command === "tasks") {
|
|
145
|
+
dispatch({
|
|
146
|
+
type: "SET_SHOW_BACKGROUND_TASK_MANAGER",
|
|
147
|
+
payload: true,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
else if (command === "mcp") {
|
|
151
|
+
dispatch({ type: "SET_SHOW_MCP_MANAGER", payload: true });
|
|
152
|
+
}
|
|
153
|
+
else if (command === "rewind") {
|
|
154
|
+
dispatch({ type: "SET_SHOW_REWIND_MANAGER", payload: true });
|
|
155
|
+
}
|
|
156
|
+
else if (command === "help") {
|
|
157
|
+
dispatch({ type: "SET_SHOW_HELP", payload: true });
|
|
158
|
+
}
|
|
159
|
+
else if (command === "status") {
|
|
160
|
+
dispatch({ type: "SET_SHOW_STATUS_COMMAND", payload: true });
|
|
161
|
+
}
|
|
162
|
+
else if (command === "plugin") {
|
|
163
|
+
dispatch({ type: "SET_SHOW_PLUGIN_MANAGER", payload: true });
|
|
164
|
+
}
|
|
165
|
+
else if (command === "model") {
|
|
166
|
+
dispatch({ type: "SET_SHOW_MODEL_SELECTOR", payload: true });
|
|
167
|
+
}
|
|
168
|
+
else if (command === "btw") {
|
|
169
|
+
dispatch({
|
|
170
|
+
type: "SET_BTW_STATE",
|
|
171
|
+
payload: { isActive: true, question: "", isLoading: false },
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.error("Effect execution error:", error);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
runEffect();
|
|
183
|
+
}, [
|
|
184
|
+
state.pendingEffect,
|
|
185
|
+
onSendMessage,
|
|
186
|
+
onAbortMessage,
|
|
187
|
+
onBackgroundCurrentTask,
|
|
188
|
+
onAskBtw,
|
|
189
|
+
onPermissionModeChange,
|
|
190
|
+
sessionId,
|
|
191
|
+
workdir,
|
|
192
|
+
getFullMessageThread,
|
|
193
|
+
logger,
|
|
194
|
+
onHasSlashCommand,
|
|
195
|
+
]);
|
|
196
|
+
useEffect(() => {
|
|
197
|
+
onFileSelectorStateChange?.(state.showFileSelector, state.filteredFiles, state.fileSearchQuery, state.atPosition);
|
|
69
198
|
}, [
|
|
70
199
|
state.showFileSelector,
|
|
71
200
|
state.filteredFiles,
|
|
72
201
|
state.fileSearchQuery,
|
|
73
202
|
state.atPosition,
|
|
203
|
+
onFileSelectorStateChange,
|
|
74
204
|
]);
|
|
75
205
|
useEffect(() => {
|
|
76
|
-
|
|
206
|
+
onCommandSelectorStateChange?.(state.showCommandSelector, state.commandSearchQuery, state.slashPosition);
|
|
77
207
|
}, [
|
|
78
208
|
state.showCommandSelector,
|
|
79
209
|
state.commandSearchQuery,
|
|
80
210
|
state.slashPosition,
|
|
211
|
+
onCommandSelectorStateChange,
|
|
81
212
|
]);
|
|
82
213
|
useEffect(() => {
|
|
83
|
-
|
|
84
|
-
}, [
|
|
214
|
+
onHistorySearchStateChange?.(state.showHistorySearch, state.historySearchQuery);
|
|
215
|
+
}, [
|
|
216
|
+
state.showHistorySearch,
|
|
217
|
+
state.historySearchQuery,
|
|
218
|
+
onHistorySearchStateChange,
|
|
219
|
+
]);
|
|
85
220
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
-
}, [state.showBackgroundTaskManager]);
|
|
221
|
+
onBackgroundTaskManagerStateChange?.(state.showBackgroundTaskManager);
|
|
222
|
+
}, [state.showBackgroundTaskManager, onBackgroundTaskManagerStateChange]);
|
|
88
223
|
useEffect(() => {
|
|
89
|
-
|
|
90
|
-
}, [state.showMcpManager]);
|
|
224
|
+
onMcpManagerStateChange?.(state.showMcpManager);
|
|
225
|
+
}, [state.showMcpManager, onMcpManagerStateChange]);
|
|
91
226
|
useEffect(() => {
|
|
92
|
-
|
|
93
|
-
}, [state.showRewindManager]);
|
|
227
|
+
onRewindManagerStateChange?.(state.showRewindManager);
|
|
228
|
+
}, [state.showRewindManager, onRewindManagerStateChange]);
|
|
94
229
|
useEffect(() => {
|
|
95
|
-
|
|
96
|
-
}, [state.showHelp]);
|
|
230
|
+
onHelpStateChange?.(state.showHelp);
|
|
231
|
+
}, [state.showHelp, onHelpStateChange]);
|
|
97
232
|
useEffect(() => {
|
|
98
|
-
|
|
99
|
-
}, [state.showStatusCommand]);
|
|
233
|
+
onStatusCommandStateChange?.(state.showStatusCommand);
|
|
234
|
+
}, [state.showStatusCommand, onStatusCommandStateChange]);
|
|
100
235
|
useEffect(() => {
|
|
101
|
-
|
|
102
|
-
}, [state.showPluginManager]);
|
|
236
|
+
onPluginManagerStateChange?.(state.showPluginManager);
|
|
237
|
+
}, [state.showPluginManager, onPluginManagerStateChange]);
|
|
103
238
|
useEffect(() => {
|
|
104
|
-
|
|
105
|
-
}, [state.showModelSelector]);
|
|
239
|
+
onModelSelectorStateChange?.(state.showModelSelector);
|
|
240
|
+
}, [state.showModelSelector, onModelSelectorStateChange]);
|
|
106
241
|
useEffect(() => {
|
|
107
|
-
|
|
108
|
-
}, [state.attachedImages]);
|
|
242
|
+
onImagesStateChange?.(state.attachedImages);
|
|
243
|
+
}, [state.attachedImages, onImagesStateChange]);
|
|
109
244
|
// Handle /btw side question
|
|
110
245
|
useEffect(() => {
|
|
111
246
|
if (state.btwState.isActive &&
|
|
@@ -113,7 +248,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
113
248
|
state.btwState.question) {
|
|
114
249
|
const askBtw = async () => {
|
|
115
250
|
try {
|
|
116
|
-
const answer = await
|
|
251
|
+
const answer = await onAskBtw?.(state.btwState.question);
|
|
117
252
|
dispatch({
|
|
118
253
|
type: "SET_BTW_STATE",
|
|
119
254
|
payload: { answer, isLoading: false },
|
|
@@ -136,6 +271,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
136
271
|
state.btwState.isActive,
|
|
137
272
|
state.btwState.isLoading,
|
|
138
273
|
state.btwState.question,
|
|
274
|
+
onAskBtw,
|
|
139
275
|
]);
|
|
140
276
|
// Methods
|
|
141
277
|
const insertTextAtCursor = useCallback((text) => {
|
|
@@ -157,7 +293,7 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
157
293
|
dispatch({ type: "ACTIVATE_FILE_SELECTOR", payload: position });
|
|
158
294
|
}, []);
|
|
159
295
|
const handleFileSelect = useCallback((filePath) => {
|
|
160
|
-
|
|
296
|
+
dispatch({ type: "SELECT_FILE", payload: filePath });
|
|
161
297
|
}, []);
|
|
162
298
|
const handleCancelFileSelect = useCallback(() => {
|
|
163
299
|
dispatch({ type: "CANCEL_FILE_SELECTOR" });
|
|
@@ -166,33 +302,18 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
166
302
|
dispatch({ type: "SET_FILE_SEARCH_QUERY", payload: query });
|
|
167
303
|
}, []);
|
|
168
304
|
const checkForAtDeletion = useCallback((cursorPos) => {
|
|
169
|
-
|
|
170
|
-
|
|
305
|
+
// This is now largely handled inside HANDLE_KEY,
|
|
306
|
+
// but kept for external calls if any.
|
|
307
|
+
return handlers.checkForAtDeletion(state, dispatch, cursorPos);
|
|
308
|
+
}, [state]);
|
|
171
309
|
const activateCommandSelector = useCallback((position) => {
|
|
172
310
|
dispatch({ type: "ACTIVATE_COMMAND_SELECTOR", payload: position });
|
|
173
311
|
}, []);
|
|
174
312
|
const handleCommandSelect = useCallback((command) => {
|
|
175
|
-
|
|
313
|
+
dispatch({ type: "SELECT_COMMAND", payload: command });
|
|
176
314
|
}, []);
|
|
177
315
|
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
|
-
};
|
|
316
|
+
dispatch({ type: "INSERT_COMMAND", payload: command });
|
|
196
317
|
}, []);
|
|
197
318
|
const handleCancelCommandSelect = useCallback(() => {
|
|
198
319
|
dispatch({ type: "CANCEL_COMMAND_SELECTOR" });
|
|
@@ -201,8 +322,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
201
322
|
dispatch({ type: "SET_COMMAND_SEARCH_QUERY", payload: query });
|
|
202
323
|
}, []);
|
|
203
324
|
const checkForSlashDeletion = useCallback((cursorPos) => {
|
|
204
|
-
return handlers.checkForSlashDeletion(
|
|
205
|
-
}, []);
|
|
325
|
+
return handlers.checkForSlashDeletion(state, dispatch, cursorPos);
|
|
326
|
+
}, [state]);
|
|
206
327
|
const handleHistorySearchSelect = useCallback((entry) => {
|
|
207
328
|
dispatch({ type: "SELECT_HISTORY_ENTRY", payload: entry });
|
|
208
329
|
}, []);
|
|
@@ -210,8 +331,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
210
331
|
dispatch({ type: "CANCEL_HISTORY_SEARCH" });
|
|
211
332
|
}, []);
|
|
212
333
|
const processSelectorInput = useCallback((char) => {
|
|
213
|
-
handlers.processSelectorInput(
|
|
214
|
-
}, []);
|
|
334
|
+
handlers.processSelectorInput(state, dispatch, char);
|
|
335
|
+
}, [state]);
|
|
215
336
|
const setInputText = useCallback((text) => {
|
|
216
337
|
dispatch({ type: "SET_INPUT_TEXT", payload: text });
|
|
217
338
|
}, []);
|
|
@@ -241,11 +362,8 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
241
362
|
}, []);
|
|
242
363
|
const setPermissionMode = useCallback((mode) => {
|
|
243
364
|
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
|
-
}, []);
|
|
365
|
+
onPermissionModeChange?.(mode);
|
|
366
|
+
}, [onPermissionModeChange]);
|
|
249
367
|
const setBtwState = useCallback((payload) => {
|
|
250
368
|
dispatch({ type: "SET_BTW_STATE", payload });
|
|
251
369
|
}, []);
|
|
@@ -262,20 +380,46 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
262
380
|
return await handlers.handlePasteImage(dispatch);
|
|
263
381
|
}, []);
|
|
264
382
|
const handlePasteInput = useCallback((input) => {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
383
|
+
dispatch({
|
|
384
|
+
type: "HANDLE_KEY",
|
|
385
|
+
payload: {
|
|
386
|
+
input,
|
|
387
|
+
key: {},
|
|
388
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
}, [onHasSlashCommand]);
|
|
392
|
+
const handleSubmit = useCallback(async () => {
|
|
393
|
+
dispatch({
|
|
394
|
+
type: "HANDLE_KEY",
|
|
395
|
+
payload: {
|
|
396
|
+
input: "",
|
|
397
|
+
key: { return: true },
|
|
398
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
}, [onHasSlashCommand]);
|
|
270
402
|
const expandLongTextPlaceholders = useCallback((text) => {
|
|
271
|
-
return handlers.expandLongTextPlaceholders(text,
|
|
272
|
-
}, []);
|
|
403
|
+
return handlers.expandLongTextPlaceholders(text, state.longTextMap);
|
|
404
|
+
}, [state.longTextMap]);
|
|
273
405
|
const clearLongTextMap = useCallback(() => {
|
|
274
406
|
dispatch({ type: "CLEAR_LONG_TEXT_MAP" });
|
|
275
407
|
}, []);
|
|
276
|
-
const handleInput = useCallback(async (input, key,
|
|
277
|
-
|
|
278
|
-
|
|
408
|
+
const handleInput = useCallback(async (input, key, _attachedImages, clearImages) => {
|
|
409
|
+
// Clear images side effect if return is pressed
|
|
410
|
+
if (key.return) {
|
|
411
|
+
clearImages?.();
|
|
412
|
+
}
|
|
413
|
+
dispatch({
|
|
414
|
+
type: "HANDLE_KEY",
|
|
415
|
+
payload: {
|
|
416
|
+
input,
|
|
417
|
+
key,
|
|
418
|
+
hasSlashCommand: (cmd) => !!onHasSlashCommand?.(cmd),
|
|
419
|
+
},
|
|
420
|
+
});
|
|
421
|
+
return true;
|
|
422
|
+
}, [onHasSlashCommand]);
|
|
279
423
|
return {
|
|
280
424
|
// State
|
|
281
425
|
inputText: state.inputText,
|
|
@@ -334,7 +478,6 @@ export const useInputManager = (callbacks = {}) => {
|
|
|
334
478
|
setShowPluginManager,
|
|
335
479
|
setShowModelSelector,
|
|
336
480
|
setPermissionMode,
|
|
337
|
-
setAllowBypassInCycle,
|
|
338
481
|
setBtwState,
|
|
339
482
|
// Image management
|
|
340
483
|
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":"inputHandlers.d.ts","sourceRoot":"","sources":["../../src/managers/inputHandlers.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O,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,32 @@ 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: "FETCH_HISTORY";
|
|
34
|
+
} | {
|
|
35
|
+
type: "PASTE_IMAGE";
|
|
36
|
+
} | {
|
|
37
|
+
type: "EXECUTE_COMMAND";
|
|
38
|
+
command: string;
|
|
39
|
+
};
|
|
13
40
|
export interface InputManagerCallbacks {
|
|
14
41
|
onInputTextChange?: (text: string) => void;
|
|
15
42
|
onCursorPositionChange?: (position: number) => void;
|
|
@@ -65,7 +92,6 @@ export interface InputState {
|
|
|
65
92
|
showPluginManager: boolean;
|
|
66
93
|
showModelSelector: boolean;
|
|
67
94
|
permissionMode: PermissionMode;
|
|
68
|
-
allowBypassInCycle: boolean;
|
|
69
95
|
selectorJustUsed: boolean;
|
|
70
96
|
isPasting: boolean;
|
|
71
97
|
pasteBuffer: string;
|
|
@@ -76,6 +102,7 @@ export interface InputState {
|
|
|
76
102
|
originalLongTextMap: Record<string, string>;
|
|
77
103
|
isFileSearching: boolean;
|
|
78
104
|
btwState: BtwState;
|
|
105
|
+
pendingEffect: PendingEffect | null;
|
|
79
106
|
}
|
|
80
107
|
export declare const initialState: InputState;
|
|
81
108
|
export type InputAction = {
|
|
@@ -153,9 +180,6 @@ export type InputAction = {
|
|
|
153
180
|
} | {
|
|
154
181
|
type: "SET_PERMISSION_MODE";
|
|
155
182
|
payload: PermissionMode;
|
|
156
|
-
} | {
|
|
157
|
-
type: "SET_ALLOW_BYPASS_IN_CYCLE";
|
|
158
|
-
payload: boolean;
|
|
159
183
|
} | {
|
|
160
184
|
type: "SET_SELECTOR_JUST_USED";
|
|
161
185
|
payload: boolean;
|
|
@@ -200,9 +224,27 @@ export type InputAction = {
|
|
|
200
224
|
} | {
|
|
201
225
|
type: "SELECT_HISTORY_ENTRY";
|
|
202
226
|
payload: PromptEntry;
|
|
227
|
+
} | {
|
|
228
|
+
type: "SELECT_COMMAND";
|
|
229
|
+
payload: string;
|
|
230
|
+
} | {
|
|
231
|
+
type: "INSERT_COMMAND";
|
|
232
|
+
payload: string;
|
|
233
|
+
} | {
|
|
234
|
+
type: "SELECT_FILE";
|
|
235
|
+
payload: string;
|
|
203
236
|
} | {
|
|
204
237
|
type: "SET_BTW_STATE";
|
|
205
238
|
payload: Partial<BtwState>;
|
|
239
|
+
} | {
|
|
240
|
+
type: "CLEAR_PENDING_EFFECT";
|
|
241
|
+
} | {
|
|
242
|
+
type: "HANDLE_KEY";
|
|
243
|
+
payload: {
|
|
244
|
+
input: string;
|
|
245
|
+
key: Key;
|
|
246
|
+
hasSlashCommand: (cmd: string) => boolean;
|
|
247
|
+
};
|
|
206
248
|
};
|
|
207
249
|
export declare function inputReducer(state: InputState, action: InputAction): InputState;
|
|
208
250
|
//# 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
|
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