wave-code 0.17.12 → 0.18.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 +6 -6
- package/dist/components/LoginCommand.d.ts.map +1 -1
- package/dist/components/LoginCommand.js +9 -13
- package/dist/print-cli.js +4 -4
- package/package.json +2 -2
- package/src/acp/agent.ts +14 -8
- package/src/components/LoginCommand.tsx +8 -11
- package/src/print-cli.ts +4 -4
package/dist/acp/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,KAAK,KAAK,IAAI,QAAQ,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAUzB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EAQpC,MAAM,0BAA0B,CAAC;AAwBlC,qBAAa,YAAa,YAAW,QAAQ;IAC3C,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,SAAS,CAA6B;gBAElC,UAAU,EAAE,mBAAmB;IAI3C,OAAO,CAAC,mBAAmB;IAkC3B,OAAO,CAAC,uBAAuB;YAmCjB,gBAAgB;IASxB,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAyBzC,YAAY,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;YAI5C,WAAW;IAgFnB,UAAU,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAA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AAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD,OAAO,CAAC,kBAAkB;YA2BZ,iBAAiB;YAsEjB,gBAAgB;YAyDhB,uBAAuB;IAmNrC,OAAO,CAAC,cAAc;IA6FtB,OAAO,CAAC,gBAAgB;IAmCxB,OAAO,CAAC,WAAW;YAmBL,yBAAyB;IAoIvC,OAAO,CAAC,eAAe;CAoSxB"}
|
package/dist/acp/agent.js
CHANGED
|
@@ -123,8 +123,8 @@ export class WaveAcpAgent {
|
|
|
123
123
|
return this.handlePermissionRequest(agentRef.instance.sessionId, context);
|
|
124
124
|
},
|
|
125
125
|
callbacks: {
|
|
126
|
-
onAssistantContentUpdated: (
|
|
127
|
-
onAssistantReasoningUpdated: (
|
|
126
|
+
onAssistantContentUpdated: (params) => callbacks.onAssistantContentUpdated?.(params),
|
|
127
|
+
onAssistantReasoningUpdated: (params) => callbacks.onAssistantReasoningUpdated?.(params),
|
|
128
128
|
onToolBlockUpdated: (params) => {
|
|
129
129
|
const cb = callbacks.onToolBlockUpdated;
|
|
130
130
|
cb?.(params);
|
|
@@ -835,26 +835,26 @@ export class WaveAcpAgent {
|
|
|
835
835
|
const toolStates = new Map();
|
|
836
836
|
return {
|
|
837
837
|
callbacks: {
|
|
838
|
-
onAssistantContentUpdated: (
|
|
838
|
+
onAssistantContentUpdated: (params) => {
|
|
839
839
|
this.connection.sessionUpdate({
|
|
840
840
|
sessionId: sessionRef.id,
|
|
841
841
|
update: {
|
|
842
842
|
sessionUpdate: "agent_message_chunk",
|
|
843
843
|
content: {
|
|
844
844
|
type: "text",
|
|
845
|
-
text: chunk,
|
|
845
|
+
text: params.chunk,
|
|
846
846
|
},
|
|
847
847
|
},
|
|
848
848
|
});
|
|
849
849
|
},
|
|
850
|
-
onAssistantReasoningUpdated: (
|
|
850
|
+
onAssistantReasoningUpdated: (params) => {
|
|
851
851
|
this.connection.sessionUpdate({
|
|
852
852
|
sessionId: sessionRef.id,
|
|
853
853
|
update: {
|
|
854
854
|
sessionUpdate: "agent_thought_chunk",
|
|
855
855
|
content: {
|
|
856
856
|
type: "text",
|
|
857
|
-
text: chunk,
|
|
857
|
+
text: params.chunk,
|
|
858
858
|
},
|
|
859
859
|
},
|
|
860
860
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginCommand.d.ts","sourceRoot":"","sources":["../../src/components/LoginCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LoginCommand.d.ts","sourceRoot":"","sources":["../../src/components/LoginCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAoBhD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0MpD,CAAC"}
|
|
@@ -7,20 +7,16 @@ import { authService } from "wave-agent-sdk";
|
|
|
7
7
|
const execFileAsync = promisify(execFile);
|
|
8
8
|
function openBrowser(url) {
|
|
9
9
|
const platform = process.platform;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
execFileAsync("open", [url]);
|
|
13
|
-
}
|
|
14
|
-
else if (platform === "win32") {
|
|
15
|
-
execFileAsync("cmd", ["/c", "start", "", url]);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
execFileAsync("xdg-open", [url]);
|
|
19
|
-
}
|
|
10
|
+
if (platform === "darwin") {
|
|
11
|
+
execFileAsync("open", [url]).catch(() => { });
|
|
20
12
|
}
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
else if (platform === "win32") {
|
|
14
|
+
execFileAsync("cmd", ["/c", "start", "", url]).catch(() => { });
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
execFileAsync("xdg-open", [url]).catch(() => { });
|
|
23
18
|
}
|
|
19
|
+
// Failures are ignored — URL is still displayed in the UI for manual copy
|
|
24
20
|
}
|
|
25
21
|
export const LoginCommand = ({ onCancel }) => {
|
|
26
22
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -75,7 +71,7 @@ export const LoginCommand = ({ onCancel }) => {
|
|
|
75
71
|
return;
|
|
76
72
|
const isAuthenticated = authService.isSSOAuthenticated();
|
|
77
73
|
if (isAuthenticated) {
|
|
78
|
-
authService.clearAuth();
|
|
74
|
+
await authService.clearAuth();
|
|
79
75
|
setMessage("Logged out successfully");
|
|
80
76
|
return;
|
|
81
77
|
}
|
package/dist/print-cli.js
CHANGED
|
@@ -33,14 +33,14 @@ export async function startPrintCli(options) {
|
|
|
33
33
|
isReasoning = false;
|
|
34
34
|
isContent = false;
|
|
35
35
|
},
|
|
36
|
-
onAssistantReasoningUpdated: (
|
|
36
|
+
onAssistantReasoningUpdated: (params) => {
|
|
37
37
|
if (!isReasoning) {
|
|
38
38
|
process.stdout.write("\n💭 Reasoning:\n");
|
|
39
39
|
isReasoning = true;
|
|
40
40
|
}
|
|
41
|
-
process.stdout.write(chunk);
|
|
41
|
+
process.stdout.write(params.chunk);
|
|
42
42
|
},
|
|
43
|
-
onAssistantContentUpdated: (
|
|
43
|
+
onAssistantContentUpdated: (params) => {
|
|
44
44
|
if (!isContent) {
|
|
45
45
|
if (isReasoning) {
|
|
46
46
|
process.stdout.write("\n\n📝 Response:\n");
|
|
@@ -50,7 +50,7 @@ export async function startPrintCli(options) {
|
|
|
50
50
|
}
|
|
51
51
|
isContent = true;
|
|
52
52
|
}
|
|
53
|
-
process.stdout.write(chunk);
|
|
53
|
+
process.stdout.write(params.chunk);
|
|
54
54
|
},
|
|
55
55
|
// Tool block callback - display tool name when tool starts
|
|
56
56
|
onToolBlockUpdated: (params) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
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.
|
|
45
|
+
"wave-agent-sdk": "0.18.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "^19.1.8",
|
package/src/acp/agent.ts
CHANGED
|
@@ -224,10 +224,10 @@ export class WaveAcpAgent implements AcpAgent {
|
|
|
224
224
|
);
|
|
225
225
|
},
|
|
226
226
|
callbacks: {
|
|
227
|
-
onAssistantContentUpdated: (
|
|
228
|
-
callbacks.onAssistantContentUpdated?.(
|
|
229
|
-
onAssistantReasoningUpdated: (
|
|
230
|
-
callbacks.onAssistantReasoningUpdated?.(
|
|
227
|
+
onAssistantContentUpdated: (params) =>
|
|
228
|
+
callbacks.onAssistantContentUpdated?.(params),
|
|
229
|
+
onAssistantReasoningUpdated: (params) =>
|
|
230
|
+
callbacks.onAssistantReasoningUpdated?.(params),
|
|
231
231
|
onToolBlockUpdated: (params: unknown) => {
|
|
232
232
|
const cb = callbacks.onToolBlockUpdated as
|
|
233
233
|
| ((params: unknown) => void)
|
|
@@ -1127,26 +1127,32 @@ export class WaveAcpAgent implements AcpAgent {
|
|
|
1127
1127
|
>();
|
|
1128
1128
|
return {
|
|
1129
1129
|
callbacks: {
|
|
1130
|
-
onAssistantContentUpdated: (
|
|
1130
|
+
onAssistantContentUpdated: (params: {
|
|
1131
|
+
chunk: string;
|
|
1132
|
+
stage: "streaming" | "end";
|
|
1133
|
+
}) => {
|
|
1131
1134
|
this.connection.sessionUpdate({
|
|
1132
1135
|
sessionId: sessionRef.id as AcpSessionId,
|
|
1133
1136
|
update: {
|
|
1134
1137
|
sessionUpdate: "agent_message_chunk",
|
|
1135
1138
|
content: {
|
|
1136
1139
|
type: "text",
|
|
1137
|
-
text: chunk,
|
|
1140
|
+
text: params.chunk,
|
|
1138
1141
|
},
|
|
1139
1142
|
},
|
|
1140
1143
|
});
|
|
1141
1144
|
},
|
|
1142
|
-
onAssistantReasoningUpdated: (
|
|
1145
|
+
onAssistantReasoningUpdated: (params: {
|
|
1146
|
+
chunk: string;
|
|
1147
|
+
stage: "streaming" | "end";
|
|
1148
|
+
}) => {
|
|
1143
1149
|
this.connection.sessionUpdate({
|
|
1144
1150
|
sessionId: sessionRef.id as AcpSessionId,
|
|
1145
1151
|
update: {
|
|
1146
1152
|
sessionUpdate: "agent_thought_chunk",
|
|
1147
1153
|
content: {
|
|
1148
1154
|
type: "text",
|
|
1149
|
-
text: chunk,
|
|
1155
|
+
text: params.chunk,
|
|
1150
1156
|
},
|
|
1151
1157
|
},
|
|
1152
1158
|
});
|
|
@@ -8,17 +8,14 @@ const execFileAsync = promisify(execFile);
|
|
|
8
8
|
|
|
9
9
|
function openBrowser(url: string): void {
|
|
10
10
|
const platform = process.platform;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
execFileAsync("xdg-open", [url]);
|
|
18
|
-
}
|
|
19
|
-
} catch {
|
|
20
|
-
// Browser not available — URL is still displayed in the UI
|
|
11
|
+
if (platform === "darwin") {
|
|
12
|
+
execFileAsync("open", [url]).catch(() => {});
|
|
13
|
+
} else if (platform === "win32") {
|
|
14
|
+
execFileAsync("cmd", ["/c", "start", "", url]).catch(() => {});
|
|
15
|
+
} else {
|
|
16
|
+
execFileAsync("xdg-open", [url]).catch(() => {});
|
|
21
17
|
}
|
|
18
|
+
// Failures are ignored — URL is still displayed in the UI for manual copy
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export interface LoginCommandProps {
|
|
@@ -88,7 +85,7 @@ export const LoginCommand: React.FC<LoginCommandProps> = ({ onCancel }) => {
|
|
|
88
85
|
|
|
89
86
|
const isAuthenticated = authService.isSSOAuthenticated();
|
|
90
87
|
if (isAuthenticated) {
|
|
91
|
-
authService.clearAuth();
|
|
88
|
+
await authService.clearAuth();
|
|
92
89
|
setMessage("Logged out successfully");
|
|
93
90
|
return;
|
|
94
91
|
}
|
package/src/print-cli.ts
CHANGED
|
@@ -75,14 +75,14 @@ export async function startPrintCli(options: PrintCliOptions): Promise<void> {
|
|
|
75
75
|
isReasoning = false;
|
|
76
76
|
isContent = false;
|
|
77
77
|
},
|
|
78
|
-
onAssistantReasoningUpdated: (chunk: string) => {
|
|
78
|
+
onAssistantReasoningUpdated: (params: { chunk: string }) => {
|
|
79
79
|
if (!isReasoning) {
|
|
80
80
|
process.stdout.write("\n💭 Reasoning:\n");
|
|
81
81
|
isReasoning = true;
|
|
82
82
|
}
|
|
83
|
-
process.stdout.write(chunk);
|
|
83
|
+
process.stdout.write(params.chunk);
|
|
84
84
|
},
|
|
85
|
-
onAssistantContentUpdated: (chunk: string) => {
|
|
85
|
+
onAssistantContentUpdated: (params: { chunk: string }) => {
|
|
86
86
|
if (!isContent) {
|
|
87
87
|
if (isReasoning) {
|
|
88
88
|
process.stdout.write("\n\n📝 Response:\n");
|
|
@@ -91,7 +91,7 @@ export async function startPrintCli(options: PrintCliOptions): Promise<void> {
|
|
|
91
91
|
}
|
|
92
92
|
isContent = true;
|
|
93
93
|
}
|
|
94
|
-
process.stdout.write(chunk);
|
|
94
|
+
process.stdout.write(params.chunk);
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
// Tool block callback - display tool name when tool starts
|