wave-code 0.12.2 → 0.12.3
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/components/App.d.ts.map +1 -1
- package/dist/components/App.js +4 -12
- package/dist/components/ChatInterface.d.ts +3 -1
- package/dist/components/ChatInterface.d.ts.map +1 -1
- package/dist/components/ChatInterface.js +4 -55
- package/dist/components/ConfirmationDetails.d.ts +0 -1
- package/dist/components/ConfirmationDetails.d.ts.map +1 -1
- package/dist/components/ConfirmationDetails.js +2 -6
- package/dist/components/MessageList.d.ts +1 -1
- package/dist/components/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList.js +2 -3
- package/dist/contexts/useChat.d.ts +0 -2
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +0 -4
- package/package.json +2 -2
- package/src/components/App.tsx +5 -15
- package/src/components/ChatInterface.tsx +9 -70
- package/src/components/ConfirmationDetails.tsx +1 -11
- package/src/components/MessageList.tsx +2 -9
- package/src/contexts/useChat.tsx +1 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,UAAU,QAAS,SAAQ,YAAY;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAiGD,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,UAAU,QAAS,SAAQ,YAAY;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAiGD,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAuC5C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAmClC,CAAC"}
|
package/dist/components/App.js
CHANGED
|
@@ -52,14 +52,13 @@ const AppWithProviders = ({ bypassPermissions, permissionMode, pluginDirs, tools
|
|
|
52
52
|
};
|
|
53
53
|
export const ChatInterfaceWithRemount = () => {
|
|
54
54
|
const { stdout } = useStdout();
|
|
55
|
-
const { isExpanded, rewindId,
|
|
56
|
-
const [remountKey, setRemountKey] = useState(String(isExpanded) + rewindId
|
|
55
|
+
const { isExpanded, rewindId, sessionId } = useChat();
|
|
56
|
+
const [remountKey, setRemountKey] = useState(String(isExpanded) + rewindId);
|
|
57
57
|
const prevSessionId = useRef(sessionId);
|
|
58
58
|
const isRemountScheduled = useRef(false);
|
|
59
59
|
useEffect(() => {
|
|
60
60
|
const newKey = String(isExpanded) +
|
|
61
61
|
rewindId +
|
|
62
|
-
wasLastDetailsTooTall +
|
|
63
62
|
(prevSessionId.current && sessionId && prevSessionId.current !== sessionId
|
|
64
63
|
? sessionId
|
|
65
64
|
: "");
|
|
@@ -79,15 +78,8 @@ export const ChatInterfaceWithRemount = () => {
|
|
|
79
78
|
if (sessionId) {
|
|
80
79
|
prevSessionId.current = sessionId;
|
|
81
80
|
}
|
|
82
|
-
}, [
|
|
83
|
-
|
|
84
|
-
rewindId,
|
|
85
|
-
wasLastDetailsTooTall,
|
|
86
|
-
sessionId,
|
|
87
|
-
remountKey,
|
|
88
|
-
stdout,
|
|
89
|
-
]);
|
|
90
|
-
return _jsx(ChatInterface, {}, remountKey);
|
|
81
|
+
}, [isExpanded, rewindId, sessionId, remountKey, stdout]);
|
|
82
|
+
return _jsx(ChatInterface, { remountKey: remountKey });
|
|
91
83
|
};
|
|
92
84
|
export const App = ({ restoreSessionId, continueLastSession, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, version, model, onExit, }) => {
|
|
93
85
|
return (_jsx(AppProvider, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, children: _jsx(AppWithProviders, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, worktreeSession: worktreeSession, workdir: workdir, version: version, model: model, onExit: onExit }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInterface.d.ts","sourceRoot":"","sources":["../../src/components/ChatInterface.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatInterface.d.ts","sourceRoot":"","sources":["../../src/components/ChatInterface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CA0F1D,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { Box, useStdout, measureElement } from "ink";
|
|
2
|
+
import { Box } from "ink";
|
|
4
3
|
import { MessageList } from "./MessageList.js";
|
|
5
4
|
import { BtwDisplay } from "./BtwDisplay.js";
|
|
6
5
|
import { InputBox } from "./InputBox.js";
|
|
@@ -10,60 +9,10 @@ import { QueuedMessageList } from "./QueuedMessageList.js";
|
|
|
10
9
|
import { ConfirmationDetails } from "./ConfirmationDetails.js";
|
|
11
10
|
import { ConfirmationSelector } from "./ConfirmationSelector.js";
|
|
12
11
|
import { useChat } from "../contexts/useChat.js";
|
|
13
|
-
export const ChatInterface = () => {
|
|
14
|
-
const {
|
|
15
|
-
const [isConfirmationTooTall, setIsConfirmationTooTall] = useState(false);
|
|
16
|
-
const { messages, isLoading, isCommandRunning, isCompressing, sendMessage, abortMessage, mcpServers, connectMcpServer, disconnectMcpServer, isExpanded, sessionId, latestTotalTokens, slashCommands, hasSlashCommand, isConfirmationVisible, confirmingTool, handleConfirmationDecision, handleConfirmationCancel: originalHandleConfirmationCancel, setWasLastDetailsTooTall, version, workdir, btwState, } = useChat();
|
|
17
|
-
const interfaceRef = useRef(null);
|
|
18
|
-
useLayoutEffect(() => {
|
|
19
|
-
if (!isConfirmationVisible) {
|
|
20
|
-
setIsConfirmationTooTall(false);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (isConfirmationTooTall) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (interfaceRef.current) {
|
|
27
|
-
const { height } = measureElement(interfaceRef.current);
|
|
28
|
-
const terminalHeight = stdout?.rows || 24;
|
|
29
|
-
if (height > terminalHeight - 3) {
|
|
30
|
-
setIsConfirmationTooTall(true);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}, [
|
|
34
|
-
messages,
|
|
35
|
-
isLoading,
|
|
36
|
-
isCommandRunning,
|
|
37
|
-
isCompressing,
|
|
38
|
-
isExpanded,
|
|
39
|
-
isConfirmationVisible,
|
|
40
|
-
isConfirmationTooTall,
|
|
41
|
-
stdout?.rows,
|
|
42
|
-
]);
|
|
12
|
+
export const ChatInterface = ({ remountKey, }) => {
|
|
13
|
+
const { messages, isLoading, isCommandRunning, isCompressing, sendMessage, abortMessage, mcpServers, connectMcpServer, disconnectMcpServer, isExpanded, sessionId, latestTotalTokens, slashCommands, hasSlashCommand, isConfirmationVisible, confirmingTool, handleConfirmationDecision, handleConfirmationCancel, version, workdir, btwState, } = useChat();
|
|
43
14
|
const displayMessages = messages;
|
|
44
|
-
const handleConfirmationCancel = useCallback(() => {
|
|
45
|
-
if (isConfirmationTooTall) {
|
|
46
|
-
setWasLastDetailsTooTall((prev) => prev + 1);
|
|
47
|
-
setIsConfirmationTooTall(false);
|
|
48
|
-
}
|
|
49
|
-
originalHandleConfirmationCancel();
|
|
50
|
-
}, [
|
|
51
|
-
isConfirmationTooTall,
|
|
52
|
-
originalHandleConfirmationCancel,
|
|
53
|
-
setWasLastDetailsTooTall,
|
|
54
|
-
]);
|
|
55
|
-
const wrappedHandleConfirmationDecision = useCallback((decision) => {
|
|
56
|
-
if (isConfirmationTooTall) {
|
|
57
|
-
setWasLastDetailsTooTall((prev) => prev + 1);
|
|
58
|
-
setIsConfirmationTooTall(false);
|
|
59
|
-
}
|
|
60
|
-
handleConfirmationDecision(decision);
|
|
61
|
-
}, [
|
|
62
|
-
isConfirmationTooTall,
|
|
63
|
-
handleConfirmationDecision,
|
|
64
|
-
setWasLastDetailsTooTall,
|
|
65
|
-
]);
|
|
66
15
|
if (!sessionId)
|
|
67
16
|
return null;
|
|
68
|
-
return (_jsxs(Box, {
|
|
17
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(MessageList, { messages: displayMessages, isExpanded: isExpanded, version: version, workdir: workdir }, remountKey), !isConfirmationVisible && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(BtwDisplay, { btwState: btwState }), (isLoading || isCommandRunning || isCompressing) && (_jsx(LoadingIndicator, { isLoading: isLoading, isCommandRunning: isCommandRunning, isCompressing: isCompressing, latestTotalTokens: latestTotalTokens })), _jsx(TaskList, {}), _jsx(QueuedMessageList, {}), _jsx(InputBox, { isLoading: isLoading, isCommandRunning: isCommandRunning, sendMessage: sendMessage, abortMessage: abortMessage, mcpServers: mcpServers, connectMcpServer: connectMcpServer, disconnectMcpServer: disconnectMcpServer, slashCommands: slashCommands, hasSlashCommand: hasSlashCommand })] })), isConfirmationVisible && (_jsxs(_Fragment, { children: [_jsx(ConfirmationDetails, { toolName: confirmingTool.name, toolInput: confirmingTool.input, planContent: confirmingTool.planContent, isExpanded: isExpanded }), _jsx(ConfirmationSelector, { toolName: confirmingTool.name, toolInput: confirmingTool.input, suggestedPrefix: confirmingTool.suggestedPrefix, hidePersistentOption: confirmingTool.hidePersistentOption, isExpanded: isExpanded, onDecision: handleConfirmationDecision, onCancel: handleConfirmationCancel, onAbort: abortMessage })] }))] }));
|
|
69
18
|
};
|
|
@@ -4,7 +4,6 @@ export interface ConfirmationDetailsProps {
|
|
|
4
4
|
toolInput?: Record<string, unknown>;
|
|
5
5
|
planContent?: string;
|
|
6
6
|
isExpanded?: boolean;
|
|
7
|
-
isStatic?: boolean;
|
|
8
7
|
}
|
|
9
8
|
export declare const ConfirmationDetails: React.FC<ConfirmationDetailsProps>;
|
|
10
9
|
//# sourceMappingURL=ConfirmationDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDetails.d.ts","sourceRoot":"","sources":["../../src/components/ConfirmationDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmationDetails.d.ts","sourceRoot":"","sources":["../../src/components/ConfirmationDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAoDlE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Box, Text, Static } from "ink";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
4
3
|
import { BASH_TOOL_NAME, EDIT_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, ASK_USER_QUESTION_TOOL_NAME, } from "wave-agent-sdk";
|
|
5
4
|
import { DiffDisplay } from "./DiffDisplay.js";
|
|
6
5
|
import { PlanDisplay } from "./PlanDisplay.js";
|
|
@@ -25,7 +24,7 @@ const getActionDescription = (toolName, toolInput) => {
|
|
|
25
24
|
return "Execute operation";
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
|
-
export const ConfirmationDetails = ({ toolName, toolInput, planContent, isExpanded = false,
|
|
27
|
+
export const ConfirmationDetails = ({ toolName, toolInput, planContent, isExpanded = false, }) => {
|
|
29
28
|
const startLineNumber = toolInput?.startLineNumber ??
|
|
30
29
|
(toolName === WRITE_TOOL_NAME ? 1 : undefined);
|
|
31
30
|
const content = (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "yellow", borderBottom: false, borderLeft: false, borderRight: false, children: [_jsxs(Text, { color: "yellow", bold: true, children: ["Tool: ", toolName] }), _jsx(Text, { color: "yellow", children: getActionDescription(toolName, toolInput) }), _jsx(DiffDisplay, { toolName: toolName, parameters: JSON.stringify(toolInput), startLineNumber: startLineNumber }), toolName !== WRITE_TOOL_NAME &&
|
|
@@ -36,9 +35,6 @@ export const ConfirmationDetails = ({ toolName, toolInput, planContent, isExpand
|
|
|
36
35
|
!!toolInput && (_jsx(Box, { paddingLeft: 2, borderLeft: true, borderColor: "cyan", children: _jsx(Text, { children: highlightToAnsi(JSON.stringify(toolInput, null, 2), "json") }) })), toolName !== ASK_USER_QUESTION_TOOL_NAME &&
|
|
37
36
|
toolName === EXIT_PLAN_MODE_TOOL_NAME &&
|
|
38
37
|
!!planContent && (_jsx(PlanDisplay, { plan: planContent, isExpanded: isExpanded }))] }));
|
|
39
|
-
if (isStatic) {
|
|
40
|
-
return (_jsx(Static, { items: [1], children: (item) => _jsx(React.Fragment, { children: content }, item) }));
|
|
41
|
-
}
|
|
42
38
|
return content;
|
|
43
39
|
};
|
|
44
40
|
ConfirmationDetails.displayName = "ConfirmationDetails";
|
|
@@ -7,5 +7,5 @@ export interface MessageListProps {
|
|
|
7
7
|
version?: string;
|
|
8
8
|
workdir?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded,
|
|
10
|
+
export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded, version, workdir }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
11
|
//# sourceMappingURL=MessageList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,gBAAgB,CAAC;AAG5D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,gBAAgB,CAAC;AAG5D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,yEAC+B,gBAAgB,6CAgHtE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import os from "os";
|
|
4
4
|
import { Box, Text, Static } from "ink";
|
|
5
5
|
import { MessageBlockItem } from "./MessageBlockItem.js";
|
|
6
|
-
export const MessageList = React.memo(({ messages, isExpanded = false,
|
|
6
|
+
export const MessageList = React.memo(({ messages, isExpanded = false, version, workdir }) => {
|
|
7
7
|
const welcomeMessage = (_jsxs(Box, { flexDirection: "column", paddingTop: 1, children: [_jsxs(Text, { color: "gray", children: ["WAVE", version ? ` v${version}` : ""] }), workdir && (_jsx(Text, { color: "gray", wrap: "truncate-middle", children: workdir.replace(os.homedir(), "~") }))] }));
|
|
8
8
|
// Limit messages to prevent long rendering times
|
|
9
9
|
const maxMessages = 10;
|
|
@@ -29,8 +29,7 @@ export const MessageList = React.memo(({ messages, isExpanded = false, forceStat
|
|
|
29
29
|
// Determine which blocks are static vs dynamic
|
|
30
30
|
const blocksWithStatus = allBlocks.map((item) => {
|
|
31
31
|
const { block } = item;
|
|
32
|
-
const isDynamic =
|
|
33
|
-
(messagesWithRunningBlocks.has(item.messageIndex) || isRunning(block));
|
|
32
|
+
const isDynamic = messagesWithRunningBlocks.has(item.messageIndex) || isRunning(block);
|
|
34
33
|
return { ...item, isDynamic };
|
|
35
34
|
});
|
|
36
35
|
const staticBlocks = blocksWithStatus.filter((b) => !b.isDynamic);
|
|
@@ -65,8 +65,6 @@ export interface ChatContextType {
|
|
|
65
65
|
messages: Message[];
|
|
66
66
|
sessionIds: string[];
|
|
67
67
|
}>;
|
|
68
|
-
wasLastDetailsTooTall: number;
|
|
69
|
-
setWasLastDetailsTooTall: React.Dispatch<React.SetStateAction<number>>;
|
|
70
68
|
getGatewayConfig: () => import("wave-agent-sdk").GatewayConfig;
|
|
71
69
|
getModelConfig: () => import("wave-agent-sdk").ModelConfig;
|
|
72
70
|
workingDirectory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/contexts/useChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACf,MAAM,gBAAgB,CAAC;AAaxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IAEvB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,cAAc,EAAE,KAAK,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACnD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACtC,CAAC,CAAC;IAEH,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CACX,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,EAClD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC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AqB,EAAE,MAAM,IAAI,CAAC;IAElC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,oBAAoB,EAAE,MAAM,OAAO,CAAC;QAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC,CAAC;IAEH,gBAAgB,EAAE,MAAM,OAAO,gBAAgB,EAAE,aAAa,CAAC;IAC/D,cAAc,EAAE,MAAM,OAAO,gBAAgB,EAAE,WAAW,CAAC;IAC3D,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,6BAA6B,EAAE,QAAQ,CAAC;IACzD,WAAW,EAAE,CACX,OAAO,EAAE,OAAO,CAAC,OAAO,6BAA6B,EAAE,QAAQ,CAAC,KAC7D,IAAI,CAAC;CACX;AAID,eAAO,MAAM,OAAO,uBAMnB,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAynBpD,CAAC"}
|
package/dist/contexts/useChat.js
CHANGED
|
@@ -81,8 +81,6 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
|
|
|
81
81
|
return newState;
|
|
82
82
|
});
|
|
83
83
|
}, []);
|
|
84
|
-
// Confirmation too tall state
|
|
85
|
-
const [wasLastDetailsTooTall, setWasLastDetailsTooTall] = useState(0);
|
|
86
84
|
const allowBypassInCycle = !!bypassPermissions || initialPermissionMode === "bypassPermissions";
|
|
87
85
|
const agentRef = useRef(null);
|
|
88
86
|
// Permission confirmation methods with queue support
|
|
@@ -497,8 +495,6 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
|
|
|
497
495
|
rewindId,
|
|
498
496
|
handleRewindSelect,
|
|
499
497
|
getFullMessageThread,
|
|
500
|
-
wasLastDetailsTooTall,
|
|
501
|
-
setWasLastDetailsTooTall,
|
|
502
498
|
getGatewayConfig,
|
|
503
499
|
getModelConfig,
|
|
504
500
|
workingDirectory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-code",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "CLI-based code assistant powered by AI, built with React and Ink",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"semver": "^7.7.4",
|
|
43
43
|
"yargs": "^17.7.2",
|
|
44
44
|
"zod": "^3.23.8",
|
|
45
|
-
"wave-agent-sdk": "0.12.
|
|
45
|
+
"wave-agent-sdk": "0.12.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "^19.1.8",
|
package/src/components/App.tsx
CHANGED
|
@@ -114,11 +114,9 @@ const AppWithProviders: React.FC<AppWithProvidersProps> = ({
|
|
|
114
114
|
|
|
115
115
|
export const ChatInterfaceWithRemount: React.FC = () => {
|
|
116
116
|
const { stdout } = useStdout();
|
|
117
|
-
const { isExpanded, rewindId,
|
|
117
|
+
const { isExpanded, rewindId, sessionId } = useChat();
|
|
118
118
|
|
|
119
|
-
const [remountKey, setRemountKey] = useState(
|
|
120
|
-
String(isExpanded) + rewindId + wasLastDetailsTooTall,
|
|
121
|
-
);
|
|
119
|
+
const [remountKey, setRemountKey] = useState(String(isExpanded) + rewindId);
|
|
122
120
|
|
|
123
121
|
const prevSessionId = useRef(sessionId);
|
|
124
122
|
const isRemountScheduled = useRef(false);
|
|
@@ -127,7 +125,6 @@ export const ChatInterfaceWithRemount: React.FC = () => {
|
|
|
127
125
|
const newKey =
|
|
128
126
|
String(isExpanded) +
|
|
129
127
|
rewindId +
|
|
130
|
-
wasLastDetailsTooTall +
|
|
131
128
|
(prevSessionId.current && sessionId && prevSessionId.current !== sessionId
|
|
132
129
|
? sessionId
|
|
133
130
|
: "");
|
|
@@ -151,16 +148,9 @@ export const ChatInterfaceWithRemount: React.FC = () => {
|
|
|
151
148
|
if (sessionId) {
|
|
152
149
|
prevSessionId.current = sessionId;
|
|
153
150
|
}
|
|
154
|
-
}, [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
wasLastDetailsTooTall,
|
|
158
|
-
sessionId,
|
|
159
|
-
remountKey,
|
|
160
|
-
stdout,
|
|
161
|
-
]);
|
|
162
|
-
|
|
163
|
-
return <ChatInterface key={remountKey} />;
|
|
151
|
+
}, [isExpanded, rewindId, sessionId, remountKey, stdout]);
|
|
152
|
+
|
|
153
|
+
return <ChatInterface remountKey={remountKey} />;
|
|
164
154
|
};
|
|
165
155
|
|
|
166
156
|
export const App: React.FC<AppProps> = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { Box
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box } from "ink";
|
|
3
3
|
import { MessageList } from "./MessageList.js";
|
|
4
4
|
import { BtwDisplay } from "./BtwDisplay.js";
|
|
5
5
|
import { InputBox } from "./InputBox.js";
|
|
@@ -10,12 +10,10 @@ import { ConfirmationDetails } from "./ConfirmationDetails.js";
|
|
|
10
10
|
import { ConfirmationSelector } from "./ConfirmationSelector.js";
|
|
11
11
|
|
|
12
12
|
import { useChat } from "../contexts/useChat.js";
|
|
13
|
-
import type { PermissionDecision } from "wave-agent-sdk";
|
|
14
|
-
|
|
15
|
-
export const ChatInterface: React.FC = () => {
|
|
16
|
-
const { stdout } = useStdout();
|
|
17
|
-
const [isConfirmationTooTall, setIsConfirmationTooTall] = useState(false);
|
|
18
13
|
|
|
14
|
+
export const ChatInterface: React.FC<{ remountKey: string }> = ({
|
|
15
|
+
remountKey,
|
|
16
|
+
}) => {
|
|
19
17
|
const {
|
|
20
18
|
messages,
|
|
21
19
|
isLoading,
|
|
@@ -34,80 +32,22 @@ export const ChatInterface: React.FC = () => {
|
|
|
34
32
|
isConfirmationVisible,
|
|
35
33
|
confirmingTool,
|
|
36
34
|
handleConfirmationDecision,
|
|
37
|
-
handleConfirmationCancel
|
|
38
|
-
setWasLastDetailsTooTall,
|
|
35
|
+
handleConfirmationCancel,
|
|
39
36
|
version,
|
|
40
37
|
workdir,
|
|
41
38
|
btwState,
|
|
42
39
|
} = useChat();
|
|
43
40
|
|
|
44
|
-
const interfaceRef = useRef(null);
|
|
45
|
-
|
|
46
|
-
useLayoutEffect(() => {
|
|
47
|
-
if (!isConfirmationVisible) {
|
|
48
|
-
setIsConfirmationTooTall(false);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (isConfirmationTooTall) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (interfaceRef.current) {
|
|
57
|
-
const { height } = measureElement(interfaceRef.current);
|
|
58
|
-
const terminalHeight = stdout?.rows || 24;
|
|
59
|
-
if (height > terminalHeight - 3) {
|
|
60
|
-
setIsConfirmationTooTall(true);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, [
|
|
64
|
-
messages,
|
|
65
|
-
isLoading,
|
|
66
|
-
isCommandRunning,
|
|
67
|
-
isCompressing,
|
|
68
|
-
isExpanded,
|
|
69
|
-
isConfirmationVisible,
|
|
70
|
-
isConfirmationTooTall,
|
|
71
|
-
stdout?.rows,
|
|
72
|
-
]);
|
|
73
|
-
|
|
74
41
|
const displayMessages = messages;
|
|
75
42
|
|
|
76
|
-
const handleConfirmationCancel = useCallback(() => {
|
|
77
|
-
if (isConfirmationTooTall) {
|
|
78
|
-
setWasLastDetailsTooTall((prev) => prev + 1);
|
|
79
|
-
setIsConfirmationTooTall(false);
|
|
80
|
-
}
|
|
81
|
-
originalHandleConfirmationCancel();
|
|
82
|
-
}, [
|
|
83
|
-
isConfirmationTooTall,
|
|
84
|
-
originalHandleConfirmationCancel,
|
|
85
|
-
setWasLastDetailsTooTall,
|
|
86
|
-
]);
|
|
87
|
-
|
|
88
|
-
const wrappedHandleConfirmationDecision = useCallback(
|
|
89
|
-
(decision: PermissionDecision) => {
|
|
90
|
-
if (isConfirmationTooTall) {
|
|
91
|
-
setWasLastDetailsTooTall((prev) => prev + 1);
|
|
92
|
-
setIsConfirmationTooTall(false);
|
|
93
|
-
}
|
|
94
|
-
handleConfirmationDecision(decision);
|
|
95
|
-
},
|
|
96
|
-
[
|
|
97
|
-
isConfirmationTooTall,
|
|
98
|
-
handleConfirmationDecision,
|
|
99
|
-
setWasLastDetailsTooTall,
|
|
100
|
-
],
|
|
101
|
-
);
|
|
102
|
-
|
|
103
43
|
if (!sessionId) return null;
|
|
104
44
|
|
|
105
45
|
return (
|
|
106
|
-
<Box
|
|
46
|
+
<Box flexDirection="column">
|
|
107
47
|
<MessageList
|
|
48
|
+
key={remountKey}
|
|
108
49
|
messages={displayMessages}
|
|
109
50
|
isExpanded={isExpanded}
|
|
110
|
-
forceStatic={isConfirmationVisible && isConfirmationTooTall}
|
|
111
51
|
version={version}
|
|
112
52
|
workdir={workdir}
|
|
113
53
|
/>
|
|
@@ -146,7 +86,6 @@ export const ChatInterface: React.FC = () => {
|
|
|
146
86
|
toolInput={confirmingTool!.input}
|
|
147
87
|
planContent={confirmingTool!.planContent}
|
|
148
88
|
isExpanded={isExpanded}
|
|
149
|
-
isStatic={isConfirmationTooTall}
|
|
150
89
|
/>
|
|
151
90
|
<ConfirmationSelector
|
|
152
91
|
toolName={confirmingTool!.name}
|
|
@@ -154,7 +93,7 @@ export const ChatInterface: React.FC = () => {
|
|
|
154
93
|
suggestedPrefix={confirmingTool!.suggestedPrefix}
|
|
155
94
|
hidePersistentOption={confirmingTool!.hidePersistentOption}
|
|
156
95
|
isExpanded={isExpanded}
|
|
157
|
-
onDecision={
|
|
96
|
+
onDecision={handleConfirmationDecision}
|
|
158
97
|
onCancel={handleConfirmationCancel}
|
|
159
98
|
onAbort={abortMessage}
|
|
160
99
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Box, Text
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
3
|
import {
|
|
4
4
|
BASH_TOOL_NAME,
|
|
5
5
|
EDIT_TOOL_NAME,
|
|
@@ -41,7 +41,6 @@ export interface ConfirmationDetailsProps {
|
|
|
41
41
|
toolInput?: Record<string, unknown>;
|
|
42
42
|
planContent?: string;
|
|
43
43
|
isExpanded?: boolean;
|
|
44
|
-
isStatic?: boolean;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
export const ConfirmationDetails: React.FC<ConfirmationDetailsProps> = ({
|
|
@@ -49,7 +48,6 @@ export const ConfirmationDetails: React.FC<ConfirmationDetailsProps> = ({
|
|
|
49
48
|
toolInput,
|
|
50
49
|
planContent,
|
|
51
50
|
isExpanded = false,
|
|
52
|
-
isStatic = false,
|
|
53
51
|
}) => {
|
|
54
52
|
const startLineNumber =
|
|
55
53
|
(toolInput?.startLineNumber as number | undefined) ??
|
|
@@ -96,14 +94,6 @@ export const ConfirmationDetails: React.FC<ConfirmationDetailsProps> = ({
|
|
|
96
94
|
</Box>
|
|
97
95
|
);
|
|
98
96
|
|
|
99
|
-
if (isStatic) {
|
|
100
|
-
return (
|
|
101
|
-
<Static items={[1]}>
|
|
102
|
-
{(item) => <React.Fragment key={item}>{content}</React.Fragment>}
|
|
103
|
-
</Static>
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
97
|
return content;
|
|
108
98
|
};
|
|
109
99
|
|
|
@@ -13,13 +13,7 @@ export interface MessageListProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const MessageList = React.memo(
|
|
16
|
-
({
|
|
17
|
-
messages,
|
|
18
|
-
isExpanded = false,
|
|
19
|
-
forceStatic = false,
|
|
20
|
-
version,
|
|
21
|
-
workdir,
|
|
22
|
-
}: MessageListProps) => {
|
|
16
|
+
({ messages, isExpanded = false, version, workdir }: MessageListProps) => {
|
|
23
17
|
const welcomeMessage = (
|
|
24
18
|
<Box flexDirection="column" paddingTop={1}>
|
|
25
19
|
<Text color="gray">WAVE{version ? ` v${version}` : ""}</Text>
|
|
@@ -64,8 +58,7 @@ export const MessageList = React.memo(
|
|
|
64
58
|
const blocksWithStatus = allBlocks.map((item) => {
|
|
65
59
|
const { block } = item;
|
|
66
60
|
const isDynamic =
|
|
67
|
-
|
|
68
|
-
(messagesWithRunningBlocks.has(item.messageIndex) || isRunning(block));
|
|
61
|
+
messagesWithRunningBlocks.has(item.messageIndex) || isRunning(block);
|
|
69
62
|
return { ...item, isDynamic };
|
|
70
63
|
});
|
|
71
64
|
|
package/src/contexts/useChat.tsx
CHANGED
|
@@ -112,8 +112,6 @@ export interface ChatContextType {
|
|
|
112
112
|
messages: Message[];
|
|
113
113
|
sessionIds: string[];
|
|
114
114
|
}>;
|
|
115
|
-
wasLastDetailsTooTall: number;
|
|
116
|
-
setWasLastDetailsTooTall: React.Dispatch<React.SetStateAction<number>>;
|
|
117
115
|
// Status metadata
|
|
118
116
|
getGatewayConfig: () => import("wave-agent-sdk").GatewayConfig;
|
|
119
117
|
getModelConfig: () => import("wave-agent-sdk").ModelConfig;
|
|
@@ -280,8 +278,6 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
|
|
|
280
278
|
[],
|
|
281
279
|
);
|
|
282
280
|
|
|
283
|
-
// Confirmation too tall state
|
|
284
|
-
const [wasLastDetailsTooTall, setWasLastDetailsTooTall] = useState(0);
|
|
285
281
|
const allowBypassInCycle =
|
|
286
282
|
!!bypassPermissions || initialPermissionMode === "bypassPermissions";
|
|
287
283
|
|
|
@@ -762,8 +758,7 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
|
|
|
762
758
|
rewindId,
|
|
763
759
|
handleRewindSelect,
|
|
764
760
|
getFullMessageThread,
|
|
765
|
-
|
|
766
|
-
setWasLastDetailsTooTall,
|
|
761
|
+
|
|
767
762
|
getGatewayConfig,
|
|
768
763
|
getModelConfig,
|
|
769
764
|
workingDirectory,
|