wave-code 0.19.6 → 0.19.8
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/cli.d.ts +0 -1
- package/dist/commands/plugin/disable.d.ts +0 -1
- package/dist/commands/plugin/enable.d.ts +0 -1
- package/dist/commands/plugin/install.d.ts +0 -1
- package/dist/commands/plugin/list.d.ts +0 -1
- package/dist/commands/plugin/marketplace.d.ts +0 -1
- package/dist/commands/plugin/uninstall.d.ts +0 -1
- package/dist/commands/plugin/update.d.ts +0 -1
- package/dist/commands/update.d.ts +0 -1
- package/dist/components/App.d.ts +0 -1
- package/dist/components/BackgroundTaskManager.d.ts +0 -1
- package/dist/components/BangDisplay.d.ts +0 -1
- package/dist/components/BtwDisplay.d.ts +0 -1
- package/dist/components/ChatInterface.d.ts +0 -1
- package/dist/components/CommandSelector.d.ts +0 -1
- package/dist/components/CompactDisplay.d.ts +0 -1
- package/dist/components/ConfirmationDetails.d.ts +0 -1
- package/dist/components/ConfirmationSelector.d.ts +0 -1
- package/dist/components/ConfirmationSelector.js +4 -3
- package/dist/components/DiffDisplay.d.ts +0 -1
- package/dist/components/DiscoverView.d.ts +0 -1
- package/dist/components/FileSelector.d.ts +0 -1
- package/dist/components/HelpView.d.ts +0 -1
- package/dist/components/HistorySearch.d.ts +0 -1
- package/dist/components/InputBox.d.ts +0 -1
- package/dist/components/InstalledView.d.ts +0 -1
- package/dist/components/LoadingIndicator.d.ts +0 -1
- package/dist/components/LoginCommand.d.ts +0 -1
- package/dist/components/Markdown.d.ts +0 -1
- package/dist/components/MarketplaceAddForm.d.ts +0 -1
- package/dist/components/MarketplaceDetail.d.ts +0 -1
- package/dist/components/MarketplaceList.d.ts +0 -1
- package/dist/components/MarketplaceView.d.ts +0 -1
- package/dist/components/McpManager.d.ts +0 -1
- package/dist/components/MessageBlockItem.d.ts +0 -1
- package/dist/components/MessageList.d.ts +0 -1
- package/dist/components/ModelSelector.d.ts +0 -1
- package/dist/components/PlanDisplay.d.ts +0 -1
- package/dist/components/PluginDetail.d.ts +0 -1
- package/dist/components/PluginList.d.ts +0 -1
- package/dist/components/PluginManagerShell.d.ts +0 -1
- package/dist/components/PluginManagerTypes.d.ts +0 -1
- package/dist/components/QueuedMessageList.d.ts +0 -1
- package/dist/components/ReasoningDisplay.d.ts +0 -1
- package/dist/components/RewindCommand.d.ts +0 -1
- package/dist/components/SessionSelector.d.ts +0 -1
- package/dist/components/StatusCommand.d.ts +0 -1
- package/dist/components/StatusLine.d.ts +0 -1
- package/dist/components/TaskList.d.ts +0 -1
- package/dist/components/TaskNotificationMessage.d.ts +0 -1
- package/dist/components/ToolDisplay.d.ts +0 -1
- package/dist/components/WorkflowManager.d.ts +0 -1
- package/dist/components/WorktreeExitPrompt.d.ts +0 -1
- package/dist/constants/commands.d.ts +0 -1
- package/dist/contexts/PluginManagerContext.d.ts +0 -1
- package/dist/contexts/useAppConfig.d.ts +0 -1
- package/dist/contexts/useChat.d.ts +0 -1
- package/dist/contexts/useChat.js +1 -1
- package/dist/contracts/status.d.ts +0 -1
- package/dist/hooks/useInputManager.d.ts +0 -1
- package/dist/hooks/usePluginManager.d.ts +0 -1
- package/dist/hooks/useTasks.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +3 -2
- package/dist/managers/inputHandlers.d.ts +0 -1
- package/dist/managers/inputReducer.d.ts +0 -1
- package/dist/plugin-manager-cli.d.ts +0 -1
- package/dist/print-cli.d.ts +0 -1
- package/dist/print-cli.js +10 -2
- package/dist/reducers/backgroundTaskManagerReducer.d.ts +0 -1
- package/dist/reducers/confirmationReducer.d.ts +1 -2
- package/dist/reducers/confirmationReducer.js +9 -10
- package/dist/reducers/helpSelectorReducer.d.ts +0 -1
- package/dist/reducers/marketplaceAddFormReducer.d.ts +0 -1
- package/dist/reducers/mcpManagerReducer.d.ts +0 -1
- package/dist/reducers/pluginDetailReducer.d.ts +0 -1
- package/dist/reducers/questionReducer.d.ts +0 -1
- package/dist/reducers/rewindSelectorReducer.d.ts +0 -1
- package/dist/reducers/selectorReducer.d.ts +0 -1
- package/dist/reducers/workflowManagerReducer.d.ts +0 -1
- package/dist/session-selector-cli.d.ts +0 -1
- package/dist/stdio/agentBridge.d.ts +5 -1
- package/dist/stdio/agentBridge.js +60 -28
- package/dist/stdio/index.d.ts +0 -1
- package/dist/stdio/protocol.d.ts +2 -3
- package/dist/stdio/stdioServer.d.ts +0 -1
- package/dist/stdio-cli.d.ts +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/clipboard.d.ts +0 -1
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/highlightUtils.d.ts +0 -1
- package/dist/utils/inputUtils.d.ts +0 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/throttle.d.ts +0 -1
- package/dist/utils/toolParameterTransforms.d.ts +0 -1
- package/dist/utils/usageSummary.d.ts +0 -1
- package/dist/utils/version.d.ts +0 -1
- package/dist/utils/worktree.d.ts +5 -2
- package/dist/utils/worktree.js +8 -4
- package/package.json +2 -2
- package/src/components/ConfirmationSelector.tsx +16 -15
- package/src/contexts/useChat.tsx +1 -1
- package/src/index.ts +8 -2
- package/src/print-cli.ts +12 -2
- package/src/reducers/confirmationReducer.ts +9 -9
- package/src/stdio/agentBridge.ts +96 -39
- package/src/stdio/protocol.ts +9 -2
- package/src/utils/worktree.ts +12 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/plugin/disable.d.ts.map +0 -1
- package/dist/commands/plugin/enable.d.ts.map +0 -1
- package/dist/commands/plugin/install.d.ts.map +0 -1
- package/dist/commands/plugin/list.d.ts.map +0 -1
- package/dist/commands/plugin/marketplace.d.ts.map +0 -1
- package/dist/commands/plugin/uninstall.d.ts.map +0 -1
- package/dist/commands/plugin/update.d.ts.map +0 -1
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/components/App.d.ts.map +0 -1
- package/dist/components/BackgroundTaskManager.d.ts.map +0 -1
- package/dist/components/BangDisplay.d.ts.map +0 -1
- package/dist/components/BtwDisplay.d.ts.map +0 -1
- package/dist/components/ChatInterface.d.ts.map +0 -1
- package/dist/components/CommandSelector.d.ts.map +0 -1
- package/dist/components/CompactDisplay.d.ts.map +0 -1
- package/dist/components/ConfirmationDetails.d.ts.map +0 -1
- package/dist/components/ConfirmationSelector.d.ts.map +0 -1
- package/dist/components/DiffDisplay.d.ts.map +0 -1
- package/dist/components/DiscoverView.d.ts.map +0 -1
- package/dist/components/FileSelector.d.ts.map +0 -1
- package/dist/components/HelpView.d.ts.map +0 -1
- package/dist/components/HistorySearch.d.ts.map +0 -1
- package/dist/components/InputBox.d.ts.map +0 -1
- package/dist/components/InstalledView.d.ts.map +0 -1
- package/dist/components/LoadingIndicator.d.ts.map +0 -1
- package/dist/components/LoginCommand.d.ts.map +0 -1
- package/dist/components/Markdown.d.ts.map +0 -1
- package/dist/components/MarketplaceAddForm.d.ts.map +0 -1
- package/dist/components/MarketplaceDetail.d.ts.map +0 -1
- package/dist/components/MarketplaceList.d.ts.map +0 -1
- package/dist/components/MarketplaceView.d.ts.map +0 -1
- package/dist/components/McpManager.d.ts.map +0 -1
- package/dist/components/MessageBlockItem.d.ts.map +0 -1
- package/dist/components/MessageList.d.ts.map +0 -1
- package/dist/components/ModelSelector.d.ts.map +0 -1
- package/dist/components/PlanDisplay.d.ts.map +0 -1
- package/dist/components/PluginDetail.d.ts.map +0 -1
- package/dist/components/PluginList.d.ts.map +0 -1
- package/dist/components/PluginManagerShell.d.ts.map +0 -1
- package/dist/components/PluginManagerTypes.d.ts.map +0 -1
- package/dist/components/QueuedMessageList.d.ts.map +0 -1
- package/dist/components/ReasoningDisplay.d.ts.map +0 -1
- package/dist/components/RewindCommand.d.ts.map +0 -1
- package/dist/components/SessionSelector.d.ts.map +0 -1
- package/dist/components/StatusCommand.d.ts.map +0 -1
- package/dist/components/StatusLine.d.ts.map +0 -1
- package/dist/components/TaskList.d.ts.map +0 -1
- package/dist/components/TaskNotificationMessage.d.ts.map +0 -1
- package/dist/components/ToolDisplay.d.ts.map +0 -1
- package/dist/components/WorkflowManager.d.ts.map +0 -1
- package/dist/components/WorktreeExitPrompt.d.ts.map +0 -1
- package/dist/constants/commands.d.ts.map +0 -1
- package/dist/contexts/PluginManagerContext.d.ts.map +0 -1
- package/dist/contexts/useAppConfig.d.ts.map +0 -1
- package/dist/contexts/useChat.d.ts.map +0 -1
- package/dist/contracts/status.d.ts.map +0 -1
- package/dist/hooks/useInputManager.d.ts.map +0 -1
- package/dist/hooks/usePluginManager.d.ts.map +0 -1
- package/dist/hooks/useTasks.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/managers/inputHandlers.d.ts.map +0 -1
- package/dist/managers/inputReducer.d.ts.map +0 -1
- package/dist/plugin-manager-cli.d.ts.map +0 -1
- package/dist/print-cli.d.ts.map +0 -1
- package/dist/reducers/backgroundTaskManagerReducer.d.ts.map +0 -1
- package/dist/reducers/confirmationReducer.d.ts.map +0 -1
- package/dist/reducers/helpSelectorReducer.d.ts.map +0 -1
- package/dist/reducers/marketplaceAddFormReducer.d.ts.map +0 -1
- package/dist/reducers/mcpManagerReducer.d.ts.map +0 -1
- package/dist/reducers/pluginDetailReducer.d.ts.map +0 -1
- package/dist/reducers/questionReducer.d.ts.map +0 -1
- package/dist/reducers/rewindSelectorReducer.d.ts.map +0 -1
- package/dist/reducers/selectorReducer.d.ts.map +0 -1
- package/dist/reducers/workflowManagerReducer.d.ts.map +0 -1
- package/dist/session-selector-cli.d.ts.map +0 -1
- package/dist/stdio/agentBridge.d.ts.map +0 -1
- package/dist/stdio/index.d.ts.map +0 -1
- package/dist/stdio/protocol.d.ts.map +0 -1
- package/dist/stdio/stdioServer.d.ts.map +0 -1
- package/dist/stdio-cli.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/highlightUtils.d.ts.map +0 -1
- package/dist/utils/inputUtils.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/throttle.d.ts.map +0 -1
- package/dist/utils/toolParameterTransforms.d.ts.map +0 -1
- package/dist/utils/usageSummary.d.ts.map +0 -1
- package/dist/utils/version.d.ts.map +0 -1
- package/dist/utils/worktree.d.ts.map +0 -1
package/dist/cli.d.ts
CHANGED
package/dist/components/App.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ const getHeaderColor = (header) => {
|
|
|
14
14
|
};
|
|
15
15
|
export const ConfirmationSelector = ({ toolName, toolInput, suggestedPrefix, hidePersistentOption, isExpanded = false, onDecision, onCancel, }) => {
|
|
16
16
|
const [state, dispatch] = useReducer(confirmationReducer, {
|
|
17
|
-
selectedOption:
|
|
17
|
+
selectedOption: "allow",
|
|
18
18
|
alternativeText: "",
|
|
19
19
|
alternativeCursorPosition: 0,
|
|
20
20
|
hasUserInput: false,
|
|
@@ -104,8 +104,9 @@ export const ConfirmationSelector = ({ toolName, toolInput, suggestedPrefix, hid
|
|
|
104
104
|
? "[x] "
|
|
105
105
|
: "[ ] "
|
|
106
106
|
: "", option.label, option.description ? ` - ${option.description}` : "", isOther && isSelected && (_jsxs(Text, { children: [":", " ", questionState.otherText ? (_jsxs(_Fragment, { children: [questionState.otherText.slice(0, questionState.otherCursorPosition), _jsx(Text, { backgroundColor: "white", color: "black", children: questionState.otherText[questionState.otherCursorPosition] || " " }), questionState.otherText.slice(questionState.otherCursorPosition + 1)] })) : (_jsx(Text, { color: "gray", dimColor: true, children: "[Type your answer...]" }))] }))] }) }, index));
|
|
107
|
-
}) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["Question ", questionState.currentQuestionIndex + 1, " of", " ", questions.length, " \u2022", currentQuestion.multiSelect ? " Space to toggle •" : "", " Use \u2191\u2193 or Tab to navigate \u2022 Enter to confirm"] }) })] })), toolName !== ASK_USER_QUESTION_TOOL_NAME && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Do you want to proceed?" }) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
107
|
+
}) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["Question ", questionState.currentQuestionIndex + 1, " of", " ", questions.length, " \u2022", currentQuestion.multiSelect ? " Space to toggle •" : "", " Use \u2191\u2193 or Tab to navigate \u2022 Enter to confirm"] }) })] })), toolName !== ASK_USER_QUESTION_TOOL_NAME && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Do you want to proceed?" }) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "allow" ? "black" : "white", backgroundColor: state.selectedOption === "allow" ? "yellow" : undefined, bold: state.selectedOption === "allow", children: [state.selectedOption === "allow" ? "> " : " ", toolName === EXIT_PLAN_MODE_TOOL_NAME
|
|
108
108
|
? "Yes, manually approve edits"
|
|
109
|
-
: "Yes, proceed"] }) }, "allow-option"), !hidePersistentOption && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "auto" ? "black" : "white", backgroundColor: state.selectedOption === "auto" ? "yellow" : undefined, bold: state.selectedOption === "auto", children: [state.selectedOption === "auto" ? "> " : " ", getAutoOptionText()] }) }, "auto-option")),
|
|
109
|
+
: "Yes, proceed"] }) }, "allow-option"), !hidePersistentOption && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "auto" ? "black" : "white", backgroundColor: state.selectedOption === "auto" ? "yellow" : undefined, bold: state.selectedOption === "auto", children: [state.selectedOption === "auto" ? "> " : " ", getAutoOptionText()] }) }, "auto-option")), (toolName === BASH_TOOL_NAME ||
|
|
110
|
+
toolName === EXIT_PLAN_MODE_TOOL_NAME) && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "bypass" ? "black" : "white", backgroundColor: state.selectedOption === "bypass" ? "yellow" : undefined, bold: state.selectedOption === "bypass", children: [state.selectedOption === "bypass" ? "> " : " ", "Yes, and bypass permissions"] }) }, "bypass-option")), _jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "alternative" ? "black" : "white", backgroundColor: state.selectedOption === "alternative" ? "yellow" : undefined, bold: state.selectedOption === "alternative", children: [state.selectedOption === "alternative" ? "> " : " ", toolName === ENTER_PLAN_MODE_TOOL_NAME && showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: "No, start implementing now" })) : showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: placeholderText })) : (_jsx(Text, { children: state.alternativeText ? (_jsxs(_Fragment, { children: [state.alternativeText.slice(0, state.alternativeCursorPosition), _jsx(Text, { backgroundColor: "white", color: "black", children: state.alternativeText[state.alternativeCursorPosition] || " " }), state.alternativeText.slice(state.alternativeCursorPosition + 1)] })) : ("Type here to tell Wave what to change") }))] }) }, "alternative-option")] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 or Tab to navigate \u2022 ESC to cancel" }) })] }))] }));
|
|
110
111
|
};
|
|
111
112
|
ConfirmationSelector.displayName = "ConfirmationSelector";
|
|
@@ -8,4 +8,3 @@ export interface MessageListProps {
|
|
|
8
8
|
workdir?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded, forceStatic, version, workdir, }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
-
//# sourceMappingURL=MessageList.d.ts.map
|
|
@@ -3,4 +3,3 @@ import type { Task, TaskStatus } from "wave-agent-sdk";
|
|
|
3
3
|
export declare const getStatusIcon: (status: TaskStatus) => React.ReactNode;
|
|
4
4
|
export declare function sortTasksByPriority(tasks: Task[], completionTimestamps: Map<string, number>, now: number, needsTruncation: boolean): Task[];
|
|
5
5
|
export declare const TaskList: React.FC;
|
|
6
|
-
//# sourceMappingURL=TaskList.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { PluginManagerContextType } from "../components/PluginManagerTypes.js";
|
|
2
2
|
export declare const PluginManagerContext: import("react").Context<PluginManagerContextType | null>;
|
|
3
3
|
export declare const usePluginManagerContext: () => PluginManagerContextType;
|
|
4
|
-
//# sourceMappingURL=PluginManagerContext.d.ts.map
|
package/dist/contexts/useChat.js
CHANGED
|
@@ -235,7 +235,7 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
|
|
|
235
235
|
agentRef.current = agent;
|
|
236
236
|
// Inject worktree session into this agent's own DI container so system
|
|
237
237
|
// prompts and permission checks reflect the CLI -w worktree. This state is
|
|
238
|
-
// per-session, not process-global (see specs/
|
|
238
|
+
// per-session, not process-global (see docs/specs/multi-agent/worktree.md FR-042).
|
|
239
239
|
if (worktreeSession) {
|
|
240
240
|
const session = {
|
|
241
241
|
originalCwd: originalCwd ?? worktreeSession.repoRoot,
|
package/dist/hooks/useTasks.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare function main(): Promise<void>;
|
|
|
2
2
|
export { startCli } from "./cli.js";
|
|
3
3
|
export { logger } from "./utils/logger.js";
|
|
4
4
|
export { readClipboardImage, cleanupTempImage, hasClipboardImage, type ClipboardImageResult, } from "./utils/clipboard.js";
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import yargs from "yargs";
|
|
2
2
|
import { hideBin } from "yargs/helpers";
|
|
3
3
|
import { startCli } from "./cli.js";
|
|
4
|
-
import { generateRandomName } from "wave-agent-sdk";
|
|
4
|
+
import { generateRandomName, loadMergedWaveConfig, } from "wave-agent-sdk";
|
|
5
5
|
import { createWorktree } from "./utils/worktree.js";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import { readFileSync } from "fs";
|
|
@@ -236,7 +236,8 @@ export async function main() {
|
|
|
236
236
|
if (!name || name === "") {
|
|
237
237
|
name = generateRandomName();
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
const baseRef = loadMergedWaveConfig(originalCwd)?.worktree?.baseRef;
|
|
240
|
+
worktreeSession = createWorktree(name, originalCwd, { baseRef });
|
|
240
241
|
// Note: the full worktree session (originalCwd etc.) is injected into the
|
|
241
242
|
// agent's DI container after the agent is created in useChat.tsx. This keeps
|
|
242
243
|
// worktree state per-session instead of process-global.
|
|
@@ -28,4 +28,3 @@ export declare const checkForSlashDeletion: (state: InputState, dispatch: React.
|
|
|
28
28
|
export declare const handleSelectorInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key) => boolean;
|
|
29
29
|
export declare const handleNormalInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key, clearImages?: () => void) => Promise<boolean>;
|
|
30
30
|
export declare const handleInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key, clearImages?: () => void) => Promise<boolean>;
|
|
31
|
-
//# sourceMappingURL=inputHandlers.d.ts.map
|
package/dist/print-cli.d.ts
CHANGED
package/dist/print-cli.js
CHANGED
|
@@ -104,8 +104,16 @@ export async function startPrintCli(options) {
|
|
|
104
104
|
await agent.sendMessage(message);
|
|
105
105
|
process.stdout.write("\n");
|
|
106
106
|
}
|
|
107
|
-
// Wait for running background tasks
|
|
108
|
-
|
|
107
|
+
// Wait for running background tasks/subagents to complete AND for the main
|
|
108
|
+
// agent to finish processing their completion notifications. The last
|
|
109
|
+
// background task flips status to "completed" before its notification is
|
|
110
|
+
// enqueued and before the main agent's follow-up turn runs, so
|
|
111
|
+
// hasRunningBackgroundWork alone becomes false while the main agent is
|
|
112
|
+
// still mid-turn — causing a TOCTOU race that aborts the final response.
|
|
113
|
+
// Including isLoading and queued notifications closes that gap.
|
|
114
|
+
while (agent.hasRunningBackgroundWork ||
|
|
115
|
+
agent.isLoading ||
|
|
116
|
+
agent.hasPendingMessages) {
|
|
109
117
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
110
118
|
}
|
|
111
119
|
// Display usage summary before exit
|
|
@@ -60,4 +60,3 @@ export type BackgroundTaskManagerAction = {
|
|
|
60
60
|
type: "CLEAR_PENDING_EFFECT";
|
|
61
61
|
};
|
|
62
62
|
export declare function backgroundTaskManagerReducer(state: BackgroundTaskManagerState, action: BackgroundTaskManagerAction): BackgroundTaskManagerState;
|
|
63
|
-
//# sourceMappingURL=backgroundTaskManagerReducer.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Key } from "ink";
|
|
2
2
|
import type { PermissionDecision } from "wave-agent-sdk";
|
|
3
3
|
export interface ConfirmationState {
|
|
4
|
-
selectedOption: "
|
|
4
|
+
selectedOption: "auto" | "bypass" | "allow" | "alternative";
|
|
5
5
|
alternativeText: string;
|
|
6
6
|
alternativeCursorPosition: number;
|
|
7
7
|
hasUserInput: boolean;
|
|
@@ -34,4 +34,3 @@ export type ConfirmationAction = {
|
|
|
34
34
|
hidePersistentOption?: boolean;
|
|
35
35
|
};
|
|
36
36
|
export declare function confirmationReducer(state: ConfirmationState, action: ConfirmationAction): ConfirmationState;
|
|
37
|
-
//# sourceMappingURL=confirmationReducer.d.ts.map
|
|
@@ -47,14 +47,7 @@ export function confirmationReducer(state, action) {
|
|
|
47
47
|
const { input, key, toolName, toolInput, suggestedPrefix, hidePersistentOption, } = action;
|
|
48
48
|
if (key.return) {
|
|
49
49
|
let decision = null;
|
|
50
|
-
if (state.selectedOption === "
|
|
51
|
-
decision = {
|
|
52
|
-
behavior: "allow",
|
|
53
|
-
newPermissionMode: "acceptEdits",
|
|
54
|
-
clearContext: true,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
else if (state.selectedOption === "allow") {
|
|
50
|
+
if (state.selectedOption === "allow") {
|
|
58
51
|
if (toolName === EXIT_PLAN_MODE_TOOL_NAME) {
|
|
59
52
|
decision = { behavior: "allow", newPermissionMode: "default" };
|
|
60
53
|
}
|
|
@@ -91,6 +84,12 @@ export function confirmationReducer(state, action) {
|
|
|
91
84
|
decision = { behavior: "allow", newPermissionMode: "acceptEdits" };
|
|
92
85
|
}
|
|
93
86
|
}
|
|
87
|
+
else if (state.selectedOption === "bypass") {
|
|
88
|
+
decision = {
|
|
89
|
+
behavior: "allow",
|
|
90
|
+
newPermissionMode: "bypassPermissions",
|
|
91
|
+
};
|
|
92
|
+
}
|
|
94
93
|
else if (state.alternativeText.trim()) {
|
|
95
94
|
decision = {
|
|
96
95
|
behavior: "deny",
|
|
@@ -123,11 +122,11 @@ export function confirmationReducer(state, action) {
|
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
124
|
const availableOptions = [];
|
|
126
|
-
if (toolName === EXIT_PLAN_MODE_TOOL_NAME)
|
|
127
|
-
availableOptions.push("clear");
|
|
128
125
|
availableOptions.push("allow");
|
|
129
126
|
if (!hidePersistentOption)
|
|
130
127
|
availableOptions.push("auto");
|
|
128
|
+
if (toolName === BASH_TOOL_NAME || toolName === EXIT_PLAN_MODE_TOOL_NAME)
|
|
129
|
+
availableOptions.push("bypass");
|
|
131
130
|
availableOptions.push("alternative");
|
|
132
131
|
if (key.upArrow) {
|
|
133
132
|
const currentIndex = availableOptions.indexOf(state.selectedOption);
|
|
@@ -22,4 +22,3 @@ export type MarketplaceAddFormAction = {
|
|
|
22
22
|
type: "CLEAR_PENDING_ACTION";
|
|
23
23
|
};
|
|
24
24
|
export declare function marketplaceAddFormReducer(state: MarketplaceAddFormState, action: MarketplaceAddFormAction): MarketplaceAddFormState;
|
|
25
|
-
//# sourceMappingURL=marketplaceAddFormReducer.d.ts.map
|