wave-code 0.9.7 → 0.10.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 +28 -0
- package/dist/acp/agent.d.ts.map +1 -0
- package/dist/acp/agent.js +603 -0
- package/dist/acp/index.d.ts +2 -0
- package/dist/acp/index.d.ts.map +1 -0
- package/dist/acp/index.js +22 -0
- package/dist/acp-cli.d.ts +2 -0
- package/dist/acp-cli.d.ts.map +1 -0
- package/dist/acp-cli.js +4 -0
- package/dist/components/ChatInterface.js +1 -1
- package/dist/components/DiffDisplay.d.ts.map +1 -1
- package/dist/components/DiffDisplay.js +33 -89
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/package.json +4 -2
- package/src/acp/agent.ts +740 -0
- package/src/acp/index.ts +28 -0
- package/src/acp-cli.ts +5 -0
- package/src/components/ChatInterface.tsx +1 -1
- package/src/components/DiffDisplay.tsx +62 -134
- package/src/contexts/useChat.tsx +0 -3
- package/src/index.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffDisplay.d.ts","sourceRoot":"","sources":["../../src/components/DiffDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DiffDisplay.d.ts","sourceRoot":"","sources":["../../src/components/DiffDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0VlD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { useMemo } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
4
|
import { WRITE_TOOL_NAME, EDIT_TOOL_NAME } from "wave-agent-sdk";
|
|
5
5
|
import { transformToolBlockToChanges } from "../utils/toolParameterTransforms.js";
|
|
@@ -85,26 +85,46 @@ export const DiffDisplay = ({ toolName, parameters, startLineNumber, }) => {
|
|
|
85
85
|
let newLineNum = change.startLineNumber || 1;
|
|
86
86
|
// Process line diffs
|
|
87
87
|
const diffElements = [];
|
|
88
|
-
lineDiffs.
|
|
88
|
+
for (let i = 0; i < lineDiffs.length; i++) {
|
|
89
|
+
const part = lineDiffs[i];
|
|
89
90
|
const lines = part.value.split("\n");
|
|
90
91
|
// diffLines might return a trailing empty string if the content ends with a newline
|
|
91
92
|
if (lines[lines.length - 1] === "") {
|
|
92
93
|
lines.pop();
|
|
93
94
|
}
|
|
94
|
-
if (part.
|
|
95
|
+
if (part.removed) {
|
|
96
|
+
// Look ahead for an added block
|
|
97
|
+
if (i + 1 < lineDiffs.length && lineDiffs[i + 1].added) {
|
|
98
|
+
const nextPart = lineDiffs[i + 1];
|
|
99
|
+
const addedLines = nextPart.value.split("\n");
|
|
100
|
+
if (addedLines[addedLines.length - 1] === "") {
|
|
101
|
+
addedLines.pop();
|
|
102
|
+
}
|
|
103
|
+
if (lines.length === addedLines.length) {
|
|
104
|
+
// Word-level diffing
|
|
105
|
+
lines.forEach((line, lineIndex) => {
|
|
106
|
+
const { removedParts, addedParts } = renderWordLevelDiff(line, addedLines[lineIndex], `word-${changeIndex}-${i}-${lineIndex}`);
|
|
107
|
+
diffElements.push(renderLine(oldLineNum++, null, "-", removedParts, "red", `remove-${changeIndex}-${i}-${lineIndex}`));
|
|
108
|
+
diffElements.push(renderLine(null, newLineNum++, "+", addedParts, "green", `add-${changeIndex}-${i}-${lineIndex}`));
|
|
109
|
+
});
|
|
110
|
+
i++; // Skip the added block
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Fallback to standard removed rendering
|
|
95
115
|
lines.forEach((line, lineIndex) => {
|
|
96
|
-
diffElements.push(renderLine(null,
|
|
116
|
+
diffElements.push(renderLine(oldLineNum++, null, "-", line, "red", `remove-${changeIndex}-${i}-${lineIndex}`));
|
|
97
117
|
});
|
|
98
118
|
}
|
|
99
|
-
else if (part.
|
|
119
|
+
else if (part.added) {
|
|
100
120
|
lines.forEach((line, lineIndex) => {
|
|
101
|
-
diffElements.push(renderLine(
|
|
121
|
+
diffElements.push(renderLine(null, newLineNum++, "+", line, "green", `add-${changeIndex}-${i}-${lineIndex}`));
|
|
102
122
|
});
|
|
103
123
|
}
|
|
104
124
|
else {
|
|
105
125
|
// Context lines - show unchanged content
|
|
106
|
-
const isFirstBlock =
|
|
107
|
-
const isLastBlock =
|
|
126
|
+
const isFirstBlock = i === 0;
|
|
127
|
+
const isLastBlock = i === lineDiffs.length - 1;
|
|
108
128
|
let linesToDisplay = lines;
|
|
109
129
|
let showEllipsisTop = false;
|
|
110
130
|
let showEllipsisBottom = false;
|
|
@@ -133,7 +153,7 @@ export const DiffDisplay = ({ toolName, parameters, startLineNumber, }) => {
|
|
|
133
153
|
}
|
|
134
154
|
}
|
|
135
155
|
if (showEllipsisTop) {
|
|
136
|
-
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-top-${changeIndex}-${
|
|
156
|
+
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-top-${changeIndex}-${i}`));
|
|
137
157
|
}
|
|
138
158
|
linesToDisplay.forEach((line, lineIndex) => {
|
|
139
159
|
// If it's a middle block and we are at the split point
|
|
@@ -144,9 +164,9 @@ export const DiffDisplay = ({ toolName, parameters, startLineNumber, }) => {
|
|
|
144
164
|
const skipCount = lines.length - 6;
|
|
145
165
|
oldLineNum += skipCount;
|
|
146
166
|
newLineNum += skipCount;
|
|
147
|
-
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-mid-${changeIndex}-${
|
|
167
|
+
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-mid-${changeIndex}-${i}`));
|
|
148
168
|
}
|
|
149
|
-
diffElements.push(renderLine(oldLineNum++, newLineNum++, " ", line, "white", `context-${changeIndex}-${
|
|
169
|
+
diffElements.push(renderLine(oldLineNum++, newLineNum++, " ", line, "white", `context-${changeIndex}-${i}-${lineIndex}`));
|
|
150
170
|
});
|
|
151
171
|
if (showEllipsisBottom) {
|
|
152
172
|
const skipCount = lines.length - linesToDisplay.length;
|
|
@@ -154,34 +174,11 @@ export const DiffDisplay = ({ toolName, parameters, startLineNumber, }) => {
|
|
|
154
174
|
// But we need to account for the lines we skipped at the end of this block
|
|
155
175
|
oldLineNum += skipCount;
|
|
156
176
|
newLineNum += skipCount;
|
|
157
|
-
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-bottom-${changeIndex}-${
|
|
177
|
+
diffElements.push(_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [" ".repeat(maxDigits * 2 + 2), "..."] }) }, `ellipsis-bottom-${changeIndex}-${i}`));
|
|
158
178
|
}
|
|
159
179
|
}
|
|
160
|
-
});
|
|
161
|
-
// If it's a single line change (one removed, one added), use word-level diff
|
|
162
|
-
if (diffElements.length === 2 &&
|
|
163
|
-
React.isValidElement(diffElements[0]) &&
|
|
164
|
-
React.isValidElement(diffElements[1]) &&
|
|
165
|
-
typeof diffElements[0].key === "string" &&
|
|
166
|
-
diffElements[0].key.includes("remove-") &&
|
|
167
|
-
typeof diffElements[1].key === "string" &&
|
|
168
|
-
diffElements[1].key.includes("add-")) {
|
|
169
|
-
const removedText = extractTextFromElement(diffElements[0]);
|
|
170
|
-
const addedText = extractTextFromElement(diffElements[1]);
|
|
171
|
-
const oldLineNumVal = extractOldLineNumFromElement(diffElements[0]);
|
|
172
|
-
const newLineNumVal = extractNewLineNumFromElement(diffElements[1]);
|
|
173
|
-
if (removedText && addedText) {
|
|
174
|
-
const { removedParts, addedParts } = renderWordLevelDiff(removedText, addedText, `word-${changeIndex}`);
|
|
175
|
-
allElements.push(renderLine(oldLineNumVal, null, "-", removedParts, "red", `word-diff-removed-${changeIndex}`));
|
|
176
|
-
allElements.push(renderLine(null, newLineNumVal, "+", addedParts, "green", `word-diff-added-${changeIndex}`));
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
allElements.push(...diffElements);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
allElements.push(...diffElements);
|
|
184
180
|
}
|
|
181
|
+
allElements.push(...diffElements);
|
|
185
182
|
}
|
|
186
183
|
catch (error) {
|
|
187
184
|
console.warn(`Error rendering diff for change ${changeIndex}:`, error);
|
|
@@ -202,56 +199,3 @@ export const DiffDisplay = ({ toolName, parameters, startLineNumber, }) => {
|
|
|
202
199
|
}
|
|
203
200
|
return (_jsx(Box, { flexDirection: "column", children: _jsx(Box, { paddingLeft: 2, borderLeft: true, borderColor: "cyan", flexDirection: "column", children: renderExpandedDiff() }) }));
|
|
204
201
|
};
|
|
205
|
-
// Helper function to extract text content from a React element
|
|
206
|
-
const extractTextFromElement = (element) => {
|
|
207
|
-
if (!React.isValidElement(element))
|
|
208
|
-
return null;
|
|
209
|
-
// Navigate through Box -> Text structure
|
|
210
|
-
// Our new structure is: Box -> Text (old), Text (new), Text (|), Text (prefix), Text (content)
|
|
211
|
-
const children = element.props.children;
|
|
212
|
-
if (Array.isArray(children) && children.length >= 5) {
|
|
213
|
-
const textElement = children[4]; // Fifth child should be the Text with content
|
|
214
|
-
if (React.isValidElement(textElement)) {
|
|
215
|
-
const textChildren = textElement.props
|
|
216
|
-
.children;
|
|
217
|
-
return Array.isArray(textChildren)
|
|
218
|
-
? textChildren.join("")
|
|
219
|
-
: String(textChildren || "");
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return null;
|
|
223
|
-
};
|
|
224
|
-
const extractOldLineNumFromElement = (element) => {
|
|
225
|
-
if (!React.isValidElement(element))
|
|
226
|
-
return null;
|
|
227
|
-
const children = element.props.children;
|
|
228
|
-
if (Array.isArray(children) && children.length >= 1) {
|
|
229
|
-
const textElement = children[0];
|
|
230
|
-
if (React.isValidElement(textElement)) {
|
|
231
|
-
const textChildren = textElement.props
|
|
232
|
-
.children;
|
|
233
|
-
const val = (Array.isArray(textChildren)
|
|
234
|
-
? textChildren.join("")
|
|
235
|
-
: String(textChildren || "")).trim();
|
|
236
|
-
return val ? parseInt(val, 10) : null;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return null;
|
|
240
|
-
};
|
|
241
|
-
const extractNewLineNumFromElement = (element) => {
|
|
242
|
-
if (!React.isValidElement(element))
|
|
243
|
-
return null;
|
|
244
|
-
const children = element.props.children;
|
|
245
|
-
if (Array.isArray(children) && children.length >= 2) {
|
|
246
|
-
const textElement = children[1];
|
|
247
|
-
if (React.isValidElement(textElement)) {
|
|
248
|
-
const textChildren = textElement.props
|
|
249
|
-
.children;
|
|
250
|
-
const val = (Array.isArray(textChildren)
|
|
251
|
-
? textChildren.join("")
|
|
252
|
-
: String(textChildren || "")).trim();
|
|
253
|
-
return val ? parseInt(val, 10) : null;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|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tB,CAAC,CAAC;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B,wBAAwB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvE,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;CAClB;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,CAsiBpD,CAAC"}
|
package/dist/contexts/useChat.js
CHANGED
|
@@ -113,9 +113,6 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, tools, w
|
|
|
113
113
|
onPermissionModeChange: (mode) => {
|
|
114
114
|
setPermissionModeState(mode);
|
|
115
115
|
},
|
|
116
|
-
onSlashCommandsChange: (commands) => {
|
|
117
|
-
setSlashCommands([...commands]);
|
|
118
|
-
},
|
|
119
116
|
};
|
|
120
117
|
try {
|
|
121
118
|
// Create the permission callback inside the try block to access showConfirmation
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,wBAAsB,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,wBAAsB,IAAI,kBAkTzB;AAGD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -65,6 +65,11 @@ export async function main() {
|
|
|
65
65
|
description: "Specify the AI model to use",
|
|
66
66
|
type: "string",
|
|
67
67
|
global: false,
|
|
68
|
+
})
|
|
69
|
+
.option("acp", {
|
|
70
|
+
description: "Run as an ACP bridge",
|
|
71
|
+
type: "boolean",
|
|
72
|
+
global: false,
|
|
68
73
|
})
|
|
69
74
|
.command("plugin", "Manage plugins and marketplaces", (yargs) => {
|
|
70
75
|
return yargs
|
|
@@ -170,6 +175,11 @@ export async function main() {
|
|
|
170
175
|
if (worktreeSession) {
|
|
171
176
|
process.chdir(workdir);
|
|
172
177
|
}
|
|
178
|
+
// Handle ACP mode
|
|
179
|
+
if (argv.acp) {
|
|
180
|
+
const { runAcp } = await import("./acp-cli.js");
|
|
181
|
+
return runAcp();
|
|
182
|
+
}
|
|
173
183
|
// Handle restore session command
|
|
174
184
|
if (argv.restore === "" ||
|
|
175
185
|
(process.argv.includes("-r") && argv.restore === undefined) ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "CLI-based code assistant powered by AI, built with React and Ink",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"react": "^19.2.4",
|
|
40
40
|
"react-dom": "19.2.4",
|
|
41
41
|
"yargs": "^17.7.2",
|
|
42
|
-
"
|
|
42
|
+
"@agentclientprotocol/sdk": "0.16.1",
|
|
43
|
+
"zod": "^3.23.8",
|
|
44
|
+
"wave-agent-sdk": "0.10.1"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@types/react": "^19.1.8",
|