wave-code 0.6.4 → 0.6.5

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":"MessageItem.d.ts","sourceRoot":"","sources":["../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW,GAAI,yBAAyB,gBAAgB,mDAoEpE,CAAC"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW,GAAI,yBAAyB,gBAAgB,mDAgEpE,CAAC"}
@@ -9,5 +9,5 @@ import { Markdown } from "./Markdown.js";
9
9
  export const MessageItem = ({ message, isExpanded }) => {
10
10
  if (message.blocks.length === 0)
11
11
  return null;
12
- return (_jsx(Box, { flexDirection: "column", gap: 1, marginTop: 1, children: _jsx(Box, { flexDirection: "column", gap: 1, children: message.blocks.map((block, blockIndex) => (_jsxs(Box, { children: [block.type === "text" && block.content.trim() && (_jsxs(Box, { children: [block.customCommandContent && (_jsx(Text, { color: "cyan", bold: true, children: "$" })), block.source === MessageSource.HOOK && (_jsx(Text, { color: "magenta", bold: true, children: "~" })), message.role === "user" ? (_jsx(Text, { backgroundColor: "gray", color: "white", children: block.content })) : (_jsx(Markdown, { children: block.content }))] })), block.type === "error" && (_jsx(Box, { children: _jsxs(Text, { color: "red", children: ["Error: ", block.content] }) })), block.type === "command_output" && (_jsx(CommandOutputDisplay, { block: block, isExpanded: isExpanded })), block.type === "tool" && (_jsx(ToolDisplay, { block: block, isExpanded: isExpanded })), block.type === "image" && (_jsxs(Box, { children: [_jsx(Text, { color: "magenta", bold: true, children: "# Image" }), block.imageUrls && block.imageUrls.length > 0 && (_jsxs(Text, { color: "gray", dimColor: true, children: [" ", "(", block.imageUrls.length, ")"] }))] })), block.type === "compress" && (_jsx(CompressDisplay, { block: block, isExpanded: isExpanded })), block.type === "reasoning" && _jsx(ReasoningDisplay, { block: block })] }, blockIndex))) }) }));
12
+ return (_jsx(Box, { flexDirection: "column", gap: 1, marginTop: 1, children: _jsx(Box, { flexDirection: "column", gap: 1, children: message.blocks.map((block, blockIndex) => (_jsxs(Box, { children: [block.type === "text" && block.content.trim() && (_jsxs(Box, { children: [block.customCommandContent && (_jsx(Text, { color: "cyan", bold: true, children: "$ " })), block.source === MessageSource.HOOK && (_jsx(Text, { color: "magenta", bold: true, children: "~ " })), message.role === "user" ? (_jsx(Text, { backgroundColor: "gray", color: "white", children: block.content })) : (_jsx(Markdown, { children: block.content }))] })), block.type === "error" && (_jsx(Box, { children: _jsxs(Text, { color: "red", children: ["Error: ", block.content] }) })), block.type === "command_output" && (_jsx(CommandOutputDisplay, { block: block, isExpanded: isExpanded })), block.type === "tool" && (_jsx(ToolDisplay, { block: block, isExpanded: isExpanded })), block.type === "image" && (_jsxs(Box, { children: [_jsx(Text, { color: "magenta", bold: true, children: "# Image" }), block.imageUrls && block.imageUrls.length > 0 && (_jsxs(Text, { color: "gray", dimColor: true, children: [" ", "(", block.imageUrls.length, ")"] }))] })), block.type === "compress" && (_jsx(CompressDisplay, { block: block, isExpanded: isExpanded })), block.type === "reasoning" && _jsx(ReasoningDisplay, { block: block })] }, blockIndex))) }) }));
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAS9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,6GAOnB,gBAAgB,6CAkGpB,CAAC"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,6GAOnB,gBAAgB,6CA4EpB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { Box, Text, Static } from "ink";
4
- import { TASK_CREATE_TOOL_NAME, TASK_GET_TOOL_NAME, TASK_UPDATE_TOOL_NAME, TASK_LIST_TOOL_NAME, } from "wave-agent-sdk";
5
4
  import { MessageItem } from "./MessageItem.js";
6
5
  export const MessageList = React.memo(({ messages, isLoading = false, isCommandRunning = false, isExpanded = false, forceStaticLastMessage = false, }) => {
7
6
  // Empty message state
@@ -11,24 +10,9 @@ export const MessageList = React.memo(({ messages, isLoading = false, isCommandR
11
10
  // Limit messages when expanded to prevent long rendering times
12
11
  const maxExpandedMessages = 20;
13
12
  const shouldLimitMessages = isExpanded && messages.length > maxExpandedMessages;
14
- // Filter out task management tools and empty messages
15
- const taskMgmtTools = [
16
- TASK_CREATE_TOOL_NAME,
17
- TASK_GET_TOOL_NAME,
18
- TASK_UPDATE_TOOL_NAME,
19
- TASK_LIST_TOOL_NAME,
20
- ];
21
- const filteredMessages = messages
22
- .map((message) => ({
23
- ...message,
24
- blocks: message.blocks.filter((block) => !(block.type === "tool" &&
25
- typeof block.name === "string" &&
26
- taskMgmtTools.includes(block.name))),
27
- }))
28
- .filter((message) => message.blocks.length > 0);
29
13
  const displayMessages = shouldLimitMessages
30
- ? filteredMessages.slice(-maxExpandedMessages)
31
- : filteredMessages;
14
+ ? messages.slice(-maxExpandedMessages)
15
+ : messages;
32
16
  // Compute which messages to render statically vs dynamically
33
17
  const lastMessage = displayMessages[displayMessages.length - 1];
34
18
  const hasNonEndTool = lastMessage?.blocks.some((block) => block.type === "tool" && block.stage !== "end");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-code",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "CLI-based code assistant powered by AI, built with React and Ink",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "react": "^19.2.4",
38
38
  "react-dom": "19.2.4",
39
39
  "yargs": "^17.7.2",
40
- "wave-agent-sdk": "0.6.4"
40
+ "wave-agent-sdk": "0.6.5"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/react": "^19.1.8",
@@ -25,14 +25,10 @@ export const MessageItem = ({ message, isExpanded }: MessageItemProps) => {
25
25
  {block.type === "text" && block.content.trim() && (
26
26
  <Box>
27
27
  {block.customCommandContent && (
28
- <Text color="cyan" bold>
29
- $
30
- </Text>
28
+ <Text color="cyan" bold>$ </Text>
31
29
  )}
32
30
  {block.source === MessageSource.HOOK && (
33
- <Text color="magenta" bold>
34
- ~
35
- </Text>
31
+ <Text color="magenta" bold>~ </Text>
36
32
  )}
37
33
  {message.role === "user" ? (
38
34
  <Text backgroundColor="gray" color="white">
@@ -1,12 +1,6 @@
1
1
  import React from "react";
2
2
  import { Box, Text, Static } from "ink";
3
3
  import type { Message } from "wave-agent-sdk";
4
- import {
5
- TASK_CREATE_TOOL_NAME,
6
- TASK_GET_TOOL_NAME,
7
- TASK_UPDATE_TOOL_NAME,
8
- TASK_LIST_TOOL_NAME,
9
- } from "wave-agent-sdk";
10
4
  import { MessageItem } from "./MessageItem.js";
11
5
 
12
6
  export interface MessageListProps {
@@ -40,31 +34,9 @@ export const MessageList = React.memo(
40
34
  const maxExpandedMessages = 20;
41
35
  const shouldLimitMessages =
42
36
  isExpanded && messages.length > maxExpandedMessages;
43
-
44
- // Filter out task management tools and empty messages
45
- const taskMgmtTools = [
46
- TASK_CREATE_TOOL_NAME,
47
- TASK_GET_TOOL_NAME,
48
- TASK_UPDATE_TOOL_NAME,
49
- TASK_LIST_TOOL_NAME,
50
- ];
51
- const filteredMessages = messages
52
- .map((message) => ({
53
- ...message,
54
- blocks: message.blocks.filter(
55
- (block) =>
56
- !(
57
- block.type === "tool" &&
58
- typeof block.name === "string" &&
59
- taskMgmtTools.includes(block.name)
60
- ),
61
- ),
62
- }))
63
- .filter((message) => message.blocks.length > 0);
64
-
65
37
  const displayMessages = shouldLimitMessages
66
- ? filteredMessages.slice(-maxExpandedMessages)
67
- : filteredMessages;
38
+ ? messages.slice(-maxExpandedMessages)
39
+ : messages;
68
40
 
69
41
  // Compute which messages to render statically vs dynamically
70
42
  const lastMessage = displayMessages[displayMessages.length - 1];