wave-code 0.11.2 → 0.11.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInterface.d.ts","sourceRoot":"","sources":["../../src/components/ChatInterface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAatE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EA0KjC,CAAC"}
1
+ {"version":3,"file":"ChatInterface.d.ts","sourceRoot":"","sources":["../../src/components/ChatInterface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAatE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAyKjC,CAAC"}
@@ -75,7 +75,7 @@ export const ChatInterface = () => {
75
75
  ]);
76
76
  if (!sessionId)
77
77
  return null;
78
- return (_jsxs(Box, { flexDirection: "column", children: [_jsx(MessageList, { messages: displayMessages, isExpanded: isExpanded, forceStatic: isConfirmationVisible && isConfirmationTooTall, isFinished: !isLoading && !isCommandRunning && !isCompressing, version: version, workdir: workdir, model: model, onDynamicBlocksHeightMeasured: handleDynamicBlocksHeightMeasured }), (isLoading || isCommandRunning || isCompressing) &&
78
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(MessageList, { messages: displayMessages, isExpanded: isExpanded, forceStatic: isConfirmationVisible && isConfirmationTooTall, version: version, workdir: workdir, model: model, onDynamicBlocksHeightMeasured: handleDynamicBlocksHeightMeasured }), (isLoading || isCommandRunning || isCompressing) &&
79
79
  !isConfirmationVisible &&
80
80
  !isExpanded && (_jsx(LoadingIndicator, { isLoading: isLoading, isCommandRunning: isCommandRunning, isCompressing: isCompressing, latestTotalTokens: latestTotalTokens })), !isConfirmationVisible && !isExpanded && _jsx(TaskList, {}), isConfirmationVisible && (_jsxs(_Fragment, { children: [_jsx(ConfirmationDetails, { toolName: confirmingTool.name, toolInput: confirmingTool.input, isExpanded: isExpanded, onHeightMeasured: handleDetailsHeightMeasured, isStatic: isConfirmationTooTall }), _jsx(ConfirmationSelector, { toolName: confirmingTool.name, toolInput: confirmingTool.input, suggestedPrefix: confirmingTool.suggestedPrefix, hidePersistentOption: confirmingTool.hidePersistentOption, isExpanded: isExpanded, onDecision: wrappedHandleConfirmationDecision, onCancel: handleConfirmationCancel, onAbort: abortMessage, onHeightMeasured: handleSelectorHeightMeasured })] })), !isConfirmationVisible && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(QueuedMessageList, {}), _jsx(InputBox, { isLoading: isLoading, isCommandRunning: isCommandRunning, sendMessage: sendMessage, abortMessage: abortMessage, mcpServers: mcpServers, connectMcpServer: connectMcpServer, disconnectMcpServer: disconnectMcpServer, slashCommands: slashCommands, hasSlashCommand: hasSlashCommand })] }))] }));
81
81
  };
@@ -4,11 +4,10 @@ export interface MessageListProps {
4
4
  messages: Message[];
5
5
  isExpanded?: boolean;
6
6
  forceStatic?: boolean;
7
- isFinished?: boolean;
8
7
  version?: string;
9
8
  workdir?: string;
10
9
  model?: string;
11
10
  onDynamicBlocksHeightMeasured?: (height: number) => void;
12
11
  }
13
- export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded, forceStatic, isFinished, version, workdir, model, onDynamicBlocksHeightMeasured, }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
12
+ export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded, forceStatic, version, workdir, model, onDynamicBlocksHeightMeasured, }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
14
13
  //# sourceMappingURL=MessageList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,WAAW,yIAUnB,gBAAgB,6CA+GpB,CAAC"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,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;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,WAAW,6HASnB,gBAAgB,6CAiHpB,CAAC"}
@@ -3,7 +3,7 @@ import React, { useLayoutEffect, useRef } from "react";
3
3
  import os from "os";
4
4
  import { Box, Text, Static, measureElement } from "ink";
5
5
  import { MessageBlockItem } from "./MessageBlockItem.js";
6
- export const MessageList = React.memo(({ messages, isExpanded = false, forceStatic = false, isFinished = false, version, workdir, model, onDynamicBlocksHeightMeasured, }) => {
6
+ export const MessageList = React.memo(({ messages, isExpanded = false, forceStatic = false, version, workdir, model, onDynamicBlocksHeightMeasured, }) => {
7
7
  const welcomeMessage = (_jsxs(Box, { flexDirection: "column", paddingTop: 1, children: [_jsxs(Text, { color: "gray", children: ["WAVE", version ? ` v${version}` : "", model ? ` • ${model}` : ""] }), 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;
@@ -13,15 +13,16 @@ export const MessageList = React.memo(({ messages, isExpanded = false, forceStat
13
13
  block,
14
14
  message,
15
15
  messageIndex,
16
- isLastMessage: messageIndex === messages.length - 1,
17
16
  // Unique key for each block to help Static component
18
17
  key: `${message.id}-${blockIndex}`,
19
18
  }));
20
19
  });
21
20
  // Determine which blocks are static vs dynamic
22
21
  const blocksWithStatus = allBlocks.map((item) => {
23
- const { isLastMessage } = item;
24
- const isDynamic = !forceStatic && !isFinished && isLastMessage;
22
+ const { block } = item;
23
+ const isDynamic = !forceStatic &&
24
+ ((block.type === "tool" && block.stage === "running") ||
25
+ (block.type === "bang" && block.isRunning));
25
26
  return { ...item, isDynamic };
26
27
  });
27
28
  const staticBlocks = blocksWithStatus.filter((b) => !b.isDynamic);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-code",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "CLI-based code assistant powered by AI, built with React and Ink",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "react-dom": "19.2.4",
42
42
  "yargs": "^17.7.2",
43
43
  "zod": "^3.23.8",
44
- "wave-agent-sdk": "0.11.2"
44
+ "wave-agent-sdk": "0.11.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/react": "^19.1.8",
@@ -121,7 +121,6 @@ export const ChatInterface: React.FC = () => {
121
121
  messages={displayMessages}
122
122
  isExpanded={isExpanded}
123
123
  forceStatic={isConfirmationVisible && isConfirmationTooTall}
124
- isFinished={!isLoading && !isCommandRunning && !isCompressing}
125
124
  version={version}
126
125
  workdir={workdir}
127
126
  model={model}
@@ -8,7 +8,6 @@ export interface MessageListProps {
8
8
  messages: Message[];
9
9
  isExpanded?: boolean;
10
10
  forceStatic?: boolean;
11
- isFinished?: boolean;
12
11
  version?: string;
13
12
  workdir?: string;
14
13
  model?: string;
@@ -20,7 +19,6 @@ export const MessageList = React.memo(
20
19
  messages,
21
20
  isExpanded = false,
22
21
  forceStatic = false,
23
- isFinished = false,
24
22
  version,
25
23
  workdir,
26
24
  model,
@@ -49,7 +47,6 @@ export const MessageList = React.memo(
49
47
  block,
50
48
  message,
51
49
  messageIndex,
52
- isLastMessage: messageIndex === messages.length - 1,
53
50
  // Unique key for each block to help Static component
54
51
  key: `${message.id}-${blockIndex}`,
55
52
  }));
@@ -57,8 +54,11 @@ export const MessageList = React.memo(
57
54
 
58
55
  // Determine which blocks are static vs dynamic
59
56
  const blocksWithStatus = allBlocks.map((item) => {
60
- const { isLastMessage } = item;
61
- const isDynamic = !forceStatic && !isFinished && isLastMessage;
57
+ const { block } = item;
58
+ const isDynamic =
59
+ !forceStatic &&
60
+ ((block.type === "tool" && block.stage === "running") ||
61
+ (block.type === "bang" && block.isRunning));
62
62
  return { ...item, isDynamic };
63
63
  });
64
64