wave-code 0.5.0 → 0.6.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/components/App.d.ts.map +1 -1
- package/dist/components/App.js +38 -2
- package/dist/components/BackgroundTaskManager.d.ts +6 -0
- package/dist/components/BackgroundTaskManager.d.ts.map +1 -0
- package/dist/components/{TaskManager.js → BackgroundTaskManager.js} +1 -1
- package/dist/components/ChatInterface.d.ts.map +1 -1
- package/dist/components/ChatInterface.js +39 -5
- package/dist/components/CommandSelector.d.ts.map +1 -1
- package/dist/components/CommandSelector.js +10 -2
- package/dist/components/CompressDisplay.d.ts.map +1 -1
- package/dist/components/CompressDisplay.js +6 -10
- package/dist/components/ConfirmationDetails.d.ts +9 -0
- package/dist/components/ConfirmationDetails.d.ts.map +1 -0
- package/dist/components/ConfirmationDetails.js +53 -0
- package/dist/components/{Confirmation.d.ts → ConfirmationSelector.d.ts} +3 -3
- package/dist/components/ConfirmationSelector.d.ts.map +1 -0
- package/dist/components/{Confirmation.js → ConfirmationSelector.js} +34 -96
- package/dist/components/DiffDisplay.d.ts.map +1 -1
- package/dist/components/DiffDisplay.js +44 -1
- package/dist/components/FileSelector.d.ts.map +1 -1
- package/dist/components/FileSelector.js +2 -2
- package/dist/components/HistorySearch.d.ts.map +1 -1
- package/dist/components/HistorySearch.js +12 -4
- package/dist/components/InputBox.d.ts +1 -3
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +7 -17
- package/dist/components/LoadingIndicator.d.ts +11 -0
- package/dist/components/LoadingIndicator.d.ts.map +1 -0
- package/dist/components/LoadingIndicator.js +6 -0
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown.js +114 -121
- package/dist/components/MessageItem.d.ts.map +1 -1
- package/dist/components/MessageItem.js +1 -2
- package/dist/components/MessageList.d.ts +2 -3
- package/dist/components/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList.js +7 -7
- package/dist/components/PlanDisplay.d.ts.map +1 -1
- package/dist/components/PlanDisplay.js +4 -12
- package/dist/components/RewindCommand.d.ts +4 -0
- package/dist/components/RewindCommand.d.ts.map +1 -1
- package/dist/components/RewindCommand.js +19 -2
- package/dist/components/SubagentBlock.d.ts.map +1 -1
- package/dist/components/SubagentBlock.js +9 -6
- package/dist/components/TaskList.d.ts +3 -0
- package/dist/components/TaskList.d.ts.map +1 -0
- package/dist/components/TaskList.js +49 -0
- package/dist/components/ToolResultDisplay.js +1 -1
- package/dist/contexts/useChat.d.ts +11 -3
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +36 -31
- package/dist/hooks/useInputManager.d.ts +2 -13
- package/dist/hooks/useInputManager.d.ts.map +1 -1
- package/dist/hooks/useInputManager.js +8 -57
- package/dist/hooks/useTasks.d.ts +2 -0
- package/dist/hooks/useTasks.d.ts.map +1 -0
- package/dist/hooks/useTasks.js +5 -0
- package/dist/managers/InputManager.d.ts +4 -28
- package/dist/managers/InputManager.d.ts.map +1 -1
- package/dist/managers/InputManager.js +22 -128
- package/package.json +5 -6
- package/src/components/App.tsx +50 -3
- package/src/components/{TaskManager.tsx → BackgroundTaskManager.tsx} +4 -2
- package/src/components/ChatInterface.tsx +79 -23
- package/src/components/CommandSelector.tsx +35 -17
- package/src/components/CompressDisplay.tsx +5 -22
- package/src/components/ConfirmationDetails.tsx +108 -0
- package/src/components/{Confirmation.tsx → ConfirmationSelector.tsx} +69 -184
- package/src/components/DiffDisplay.tsx +62 -1
- package/src/components/FileSelector.tsx +0 -2
- package/src/components/HistorySearch.tsx +45 -21
- package/src/components/InputBox.tsx +11 -33
- package/src/components/LoadingIndicator.tsx +56 -0
- package/src/components/Markdown.tsx +126 -323
- package/src/components/MessageItem.tsx +1 -3
- package/src/components/MessageList.tsx +10 -67
- package/src/components/PlanDisplay.tsx +4 -27
- package/src/components/RewindCommand.tsx +38 -1
- package/src/components/SubagentBlock.tsx +25 -16
- package/src/components/TaskList.tsx +70 -0
- package/src/components/ToolResultDisplay.tsx +2 -2
- package/src/contexts/useChat.tsx +57 -40
- package/src/hooks/useInputManager.ts +9 -73
- package/src/hooks/useTasks.ts +6 -0
- package/src/managers/InputManager.ts +25 -159
- package/dist/components/Confirmation.d.ts.map +0 -1
- package/dist/components/MemoryDisplay.d.ts +0 -8
- package/dist/components/MemoryDisplay.d.ts.map +0 -1
- package/dist/components/MemoryDisplay.js +0 -25
- package/dist/components/MemoryTypeSelector.d.ts +0 -8
- package/dist/components/MemoryTypeSelector.d.ts.map +0 -1
- package/dist/components/MemoryTypeSelector.js +0 -38
- package/dist/components/TaskManager.d.ts +0 -6
- package/dist/components/TaskManager.d.ts.map +0 -1
- package/src/components/MemoryDisplay.tsx +0 -62
- package/src/components/MemoryTypeSelector.tsx +0 -98
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../src/components/Confirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAwB,MAAM,gBAAgB,CAAC;AAmD/E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AASD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8fpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryDisplay.d.ts","sourceRoot":"","sources":["../../src/components/MemoryDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqDtD,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
export const MemoryDisplay = ({ block }) => {
|
|
4
|
-
const { content, isSuccess, memoryType, storagePath } = block;
|
|
5
|
-
const getStatusIcon = () => {
|
|
6
|
-
return isSuccess ? "💾" : "⚠️";
|
|
7
|
-
};
|
|
8
|
-
const getStatusColor = () => {
|
|
9
|
-
return isSuccess ? "green" : "red";
|
|
10
|
-
};
|
|
11
|
-
const getStatusText = () => {
|
|
12
|
-
return isSuccess ? "Added to memory" : "Failed to add memory";
|
|
13
|
-
};
|
|
14
|
-
const getStorageText = () => {
|
|
15
|
-
if (!isSuccess)
|
|
16
|
-
return null;
|
|
17
|
-
if (memoryType === "user") {
|
|
18
|
-
return `Memory saved to ${storagePath || "AGENTS.md"}`;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return `Memory saved to ${storagePath || "AGENTS.md"}`;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { color: getStatusColor(), children: [getStatusIcon(), " "] }), _jsx(Text, { color: getStatusColor(), children: getStatusText() })] }), content && (_jsx(Box, { marginTop: 1, paddingLeft: 2, children: _jsx(Box, { borderLeft: true, borderColor: isSuccess ? "green" : "red", paddingLeft: 1, children: _jsx(Text, { color: "gray", children: content }) }) })), isSuccess && (_jsx(Box, { paddingLeft: 2, marginTop: 1, children: _jsx(Text, { color: "yellow", dimColor: true, children: getStorageText() }) }))] }));
|
|
25
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface MemoryTypeSelectorProps {
|
|
3
|
-
message: string;
|
|
4
|
-
onSelect: (type: "project" | "user") => void;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const MemoryTypeSelector: React.FC<MemoryTypeSelectorProps>;
|
|
8
|
-
//# sourceMappingURL=MemoryTypeSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryTypeSelector.d.ts","sourceRoot":"","sources":["../../src/components/MemoryTypeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwFhE,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Box, Text, useInput } from "ink";
|
|
4
|
-
export const MemoryTypeSelector = ({ message, onSelect, onCancel, }) => {
|
|
5
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
6
|
-
const options = [
|
|
7
|
-
{
|
|
8
|
-
type: "project",
|
|
9
|
-
label: "Project Memory",
|
|
10
|
-
description: "Save to current project (AGENTS.md)",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: "user",
|
|
14
|
-
label: "User Memory",
|
|
15
|
-
description: "Save to user global memory",
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
useInput((input, key) => {
|
|
19
|
-
if (key.return) {
|
|
20
|
-
const selectedOption = options[selectedIndex];
|
|
21
|
-
onSelect(selectedOption.type);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (key.escape) {
|
|
25
|
-
onCancel();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (key.upArrow) {
|
|
29
|
-
setSelectedIndex(Math.max(0, selectedIndex - 1));
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (key.downArrow) {
|
|
33
|
-
setSelectedIndex(Math.min(options.length - 1, selectedIndex + 1));
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "green", borderBottom: false, borderLeft: false, borderRight: false, paddingTop: 1, gap: 1, children: [_jsx(Box, { children: _jsxs(Text, { color: "green", bold: true, children: ["Save Memory: \"", message.substring(1).trim(), "\""] }) }), _jsx(Text, { color: "gray", children: "Choose where to save this memory:" }), options.map((option, index) => (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: index === selectedIndex ? "black" : "white", backgroundColor: index === selectedIndex ? "green" : undefined, bold: index === selectedIndex, children: option.label }), index === selectedIndex && (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", dimColor: true, children: option.description }) }))] }, option.type))), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 to navigate, Enter to select, Escape to cancel" }) })] }));
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskManager.d.ts","sourceRoot":"","sources":["../../src/components/TaskManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2SlD,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import type { MemoryBlock } from "wave-agent-sdk";
|
|
4
|
-
|
|
5
|
-
interface MemoryDisplayProps {
|
|
6
|
-
block: MemoryBlock;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const MemoryDisplay: React.FC<MemoryDisplayProps> = ({ block }) => {
|
|
10
|
-
const { content, isSuccess, memoryType, storagePath } = block;
|
|
11
|
-
|
|
12
|
-
const getStatusIcon = () => {
|
|
13
|
-
return isSuccess ? "💾" : "⚠️";
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getStatusColor = () => {
|
|
17
|
-
return isSuccess ? "green" : "red";
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getStatusText = () => {
|
|
21
|
-
return isSuccess ? "Added to memory" : "Failed to add memory";
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const getStorageText = () => {
|
|
25
|
-
if (!isSuccess) return null;
|
|
26
|
-
|
|
27
|
-
if (memoryType === "user") {
|
|
28
|
-
return `Memory saved to ${storagePath || "AGENTS.md"}`;
|
|
29
|
-
} else {
|
|
30
|
-
return `Memory saved to ${storagePath || "AGENTS.md"}`;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Box flexDirection="column">
|
|
36
|
-
<Box>
|
|
37
|
-
<Text color={getStatusColor()}>{getStatusIcon()} </Text>
|
|
38
|
-
<Text color={getStatusColor()}>{getStatusText()}</Text>
|
|
39
|
-
</Box>
|
|
40
|
-
|
|
41
|
-
{content && (
|
|
42
|
-
<Box marginTop={1} paddingLeft={2}>
|
|
43
|
-
<Box
|
|
44
|
-
borderLeft
|
|
45
|
-
borderColor={isSuccess ? "green" : "red"}
|
|
46
|
-
paddingLeft={1}
|
|
47
|
-
>
|
|
48
|
-
<Text color="gray">{content}</Text>
|
|
49
|
-
</Box>
|
|
50
|
-
</Box>
|
|
51
|
-
)}
|
|
52
|
-
|
|
53
|
-
{isSuccess && (
|
|
54
|
-
<Box paddingLeft={2} marginTop={1}>
|
|
55
|
-
<Text color="yellow" dimColor>
|
|
56
|
-
{getStorageText()}
|
|
57
|
-
</Text>
|
|
58
|
-
</Box>
|
|
59
|
-
)}
|
|
60
|
-
</Box>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { Box, Text, useInput } from "ink";
|
|
3
|
-
|
|
4
|
-
export interface MemoryTypeSelectorProps {
|
|
5
|
-
message: string;
|
|
6
|
-
onSelect: (type: "project" | "user") => void;
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const MemoryTypeSelector: React.FC<MemoryTypeSelectorProps> = ({
|
|
11
|
-
message,
|
|
12
|
-
onSelect,
|
|
13
|
-
onCancel,
|
|
14
|
-
}) => {
|
|
15
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
16
|
-
|
|
17
|
-
const options = [
|
|
18
|
-
{
|
|
19
|
-
type: "project" as const,
|
|
20
|
-
label: "Project Memory",
|
|
21
|
-
description: "Save to current project (AGENTS.md)",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: "user" as const,
|
|
25
|
-
label: "User Memory",
|
|
26
|
-
description: "Save to user global memory",
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
useInput((input, key) => {
|
|
31
|
-
if (key.return) {
|
|
32
|
-
const selectedOption = options[selectedIndex];
|
|
33
|
-
onSelect(selectedOption.type);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (key.escape) {
|
|
38
|
-
onCancel();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (key.upArrow) {
|
|
43
|
-
setSelectedIndex(Math.max(0, selectedIndex - 1));
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (key.downArrow) {
|
|
48
|
-
setSelectedIndex(Math.min(options.length - 1, selectedIndex + 1));
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Box
|
|
55
|
-
flexDirection="column"
|
|
56
|
-
borderStyle="single"
|
|
57
|
-
borderColor="green"
|
|
58
|
-
borderBottom={false}
|
|
59
|
-
borderLeft={false}
|
|
60
|
-
borderRight={false}
|
|
61
|
-
paddingTop={1}
|
|
62
|
-
gap={1}
|
|
63
|
-
>
|
|
64
|
-
<Box>
|
|
65
|
-
<Text color="green" bold>
|
|
66
|
-
Save Memory: "{message.substring(1).trim()}"
|
|
67
|
-
</Text>
|
|
68
|
-
</Box>
|
|
69
|
-
|
|
70
|
-
<Text color="gray">Choose where to save this memory:</Text>
|
|
71
|
-
|
|
72
|
-
{options.map((option, index) => (
|
|
73
|
-
<Box key={option.type} flexDirection="column">
|
|
74
|
-
<Text
|
|
75
|
-
color={index === selectedIndex ? "black" : "white"}
|
|
76
|
-
backgroundColor={index === selectedIndex ? "green" : undefined}
|
|
77
|
-
bold={index === selectedIndex}
|
|
78
|
-
>
|
|
79
|
-
{option.label}
|
|
80
|
-
</Text>
|
|
81
|
-
{index === selectedIndex && (
|
|
82
|
-
<Box marginLeft={2}>
|
|
83
|
-
<Text color="gray" dimColor>
|
|
84
|
-
{option.description}
|
|
85
|
-
</Text>
|
|
86
|
-
</Box>
|
|
87
|
-
)}
|
|
88
|
-
</Box>
|
|
89
|
-
))}
|
|
90
|
-
|
|
91
|
-
<Box>
|
|
92
|
-
<Text dimColor>
|
|
93
|
-
Use ↑↓ to navigate, Enter to select, Escape to cancel
|
|
94
|
-
</Text>
|
|
95
|
-
</Box>
|
|
96
|
-
</Box>
|
|
97
|
-
);
|
|
98
|
-
};
|