wave-code 0.17.11 → 0.18.0

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.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: (chunk) => callbacks.onAssistantContentUpdated?.(chunk, ""),
127
- onAssistantReasoningUpdated: (chunk) => callbacks.onAssistantReasoningUpdated?.(chunk, ""),
126
+ onAssistantContentUpdated: (messageId, chunk) => callbacks.onAssistantContentUpdated?.(messageId, chunk, ""),
127
+ onAssistantReasoningUpdated: (messageId, chunk) => callbacks.onAssistantReasoningUpdated?.(messageId, chunk, ""),
128
128
  onToolBlockUpdated: (params) => {
129
129
  const cb = callbacks.onToolBlockUpdated;
130
130
  cb?.(params);
@@ -835,7 +835,7 @@ export class WaveAcpAgent {
835
835
  const toolStates = new Map();
836
836
  return {
837
837
  callbacks: {
838
- onAssistantContentUpdated: (chunk) => {
838
+ onAssistantContentUpdated: (_messageId, chunk) => {
839
839
  this.connection.sessionUpdate({
840
840
  sessionId: sessionRef.id,
841
841
  update: {
@@ -847,7 +847,7 @@ export class WaveAcpAgent {
847
847
  },
848
848
  });
849
849
  },
850
- onAssistantReasoningUpdated: (chunk) => {
850
+ onAssistantReasoningUpdated: (_messageId, chunk) => {
851
851
  this.connection.sessionUpdate({
852
852
  sessionId: sessionRef.id,
853
853
  update: {
@@ -1 +1 @@
1
- {"version":3,"file":"LoginCommand.d.ts","sourceRoot":"","sources":["../../src/components/LoginCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAuBhD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0MpD,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
- try {
11
- if (platform === "darwin") {
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
- catch {
22
- // Browser not available URL is still displayed in the UI
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: (chunk) => {
36
+ onAssistantReasoningUpdated: (_messageId, chunk) => {
37
37
  if (!isReasoning) {
38
38
  process.stdout.write("\n💭 Reasoning:\n");
39
39
  isReasoning = true;
40
40
  }
41
41
  process.stdout.write(chunk);
42
42
  },
43
- onAssistantContentUpdated: (chunk) => {
43
+ onAssistantContentUpdated: (_messageId, chunk) => {
44
44
  if (!isContent) {
45
45
  if (isReasoning) {
46
46
  process.stdout.write("\n\n📝 Response:\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-code",
3
- "version": "0.17.11",
3
+ "version": "0.18.0",
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.17.11"
45
+ "wave-agent-sdk": "0.18.0"
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: (chunk: string) =>
228
- callbacks.onAssistantContentUpdated?.(chunk, ""),
229
- onAssistantReasoningUpdated: (chunk: string) =>
230
- callbacks.onAssistantReasoningUpdated?.(chunk, ""),
227
+ onAssistantContentUpdated: (messageId: string, chunk: string) =>
228
+ callbacks.onAssistantContentUpdated?.(messageId, chunk, ""),
229
+ onAssistantReasoningUpdated: (messageId: string, chunk: string) =>
230
+ callbacks.onAssistantReasoningUpdated?.(messageId, chunk, ""),
231
231
  onToolBlockUpdated: (params: unknown) => {
232
232
  const cb = callbacks.onToolBlockUpdated as
233
233
  | ((params: unknown) => void)
@@ -1127,7 +1127,7 @@ export class WaveAcpAgent implements AcpAgent {
1127
1127
  >();
1128
1128
  return {
1129
1129
  callbacks: {
1130
- onAssistantContentUpdated: (chunk: string) => {
1130
+ onAssistantContentUpdated: (_messageId: string, chunk: string) => {
1131
1131
  this.connection.sessionUpdate({
1132
1132
  sessionId: sessionRef.id as AcpSessionId,
1133
1133
  update: {
@@ -1139,7 +1139,7 @@ export class WaveAcpAgent implements AcpAgent {
1139
1139
  },
1140
1140
  });
1141
1141
  },
1142
- onAssistantReasoningUpdated: (chunk: string) => {
1142
+ onAssistantReasoningUpdated: (_messageId: string, chunk: string) => {
1143
1143
  this.connection.sessionUpdate({
1144
1144
  sessionId: sessionRef.id as AcpSessionId,
1145
1145
  update: {
@@ -8,17 +8,14 @@ const execFileAsync = promisify(execFile);
8
8
 
9
9
  function openBrowser(url: string): void {
10
10
  const platform = process.platform;
11
- try {
12
- if (platform === "darwin") {
13
- execFileAsync("open", [url]);
14
- } else if (platform === "win32") {
15
- execFileAsync("cmd", ["/c", "start", "", url]);
16
- } else {
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: (_messageId: string, chunk: string) => {
79
79
  if (!isReasoning) {
80
80
  process.stdout.write("\n💭 Reasoning:\n");
81
81
  isReasoning = true;
82
82
  }
83
83
  process.stdout.write(chunk);
84
84
  },
85
- onAssistantContentUpdated: (chunk: string) => {
85
+ onAssistantContentUpdated: (_messageId: string, chunk: string) => {
86
86
  if (!isContent) {
87
87
  if (isReasoning) {
88
88
  process.stdout.write("\n\n📝 Response:\n");