wave-code 0.9.5 → 0.9.7

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":"marketplace.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/marketplace.ts"],"names":[],"mappings":"AAEA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,iBAsBlE;AAED,wBAAsB,uBAAuB,kBA8B5C;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,iBAWpE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,iBAgBrE"}
1
+ {"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/marketplace.ts"],"names":[],"mappings":"AAEA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,iBAsBlE;AAED,wBAAsB,uBAAuB,kBAiC5C;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,iBAWpE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,iBAgBrE"}
@@ -45,7 +45,10 @@ export async function listMarketplacesCommand() {
45
45
  sourceInfo = source.url + (source.ref ? `#${source.ref}` : "");
46
46
  }
47
47
  const builtinLabel = m.isBuiltin ? " [builtin]" : "";
48
- console.log(`- ${m.name}${builtinLabel}: ${sourceInfo} (${m.source.source})`);
48
+ const lastUpdatedLabel = m.lastUpdated
49
+ ? ` (Last updated: ${new Date(m.lastUpdated).toLocaleString()})`
50
+ : "";
51
+ console.log(`- ${m.name}${builtinLabel}: ${sourceInfo} (${m.source.source})${lastUpdatedLabel}`);
49
52
  });
50
53
  }
51
54
  process.exit(0);
@@ -1 +1 @@
1
- {"version":3,"file":"FileSelector.d.ts","sourceRoot":"","sources":["../../src/components/FileSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8HpD,CAAC"}
1
+ {"version":3,"file":"FileSelector.d.ts","sourceRoot":"","sources":["../../src/components/FileSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuHpD,CAAC"}
@@ -26,22 +26,21 @@ export const FileSelector = ({ files, searchQuery, isLoading = false, onSelect,
26
26
  if (files.length === 0) {
27
27
  return (_jsx(Box, { flexDirection: "column", borderStyle: "single", borderColor: isLoading ? "cyan" : "yellow", borderBottom: false, borderLeft: false, borderRight: false, children: isLoading ? (_jsx(Text, { color: "cyan", bold: true, children: "Select File/Directory..." })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { color: "yellow", children: ["No files found for \"", searchQuery, "\""] }), _jsx(Text, { dimColor: true, children: "Press Escape to cancel" })] })) }));
28
28
  }
29
- const maxDisplay = 10;
29
+ const maxDisplay = 5;
30
30
  // Calculate display window start and end positions
31
31
  const getDisplayWindow = () => {
32
- const startIndex = Math.max(0, Math.min(selectedIndex - Math.floor(maxDisplay / 2), files.length - maxDisplay));
32
+ const startIndex = Math.max(0, Math.min(selectedIndex - Math.floor(maxDisplay / 2), Math.max(0, files.length - maxDisplay)));
33
33
  const endIndex = Math.min(files.length, startIndex + maxDisplay);
34
- const adjustedStartIndex = Math.max(0, endIndex - maxDisplay);
35
34
  return {
36
- startIndex: adjustedStartIndex,
37
- endIndex: endIndex,
38
- displayFiles: files.slice(adjustedStartIndex, endIndex),
35
+ startIndex,
36
+ endIndex,
37
+ displayFiles: files.slice(startIndex, endIndex),
39
38
  };
40
39
  };
41
- const { startIndex, endIndex, displayFiles } = getDisplayWindow();
42
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", borderBottom: false, borderLeft: false, borderRight: false, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["Select File/Directory ", searchQuery && `(filtering: "${searchQuery}")`] }), startIndex > 0 && (_jsxs(Text, { dimColor: true, children: ["... ", startIndex, " more files above"] })), displayFiles.map((fileItem, displayIndex) => {
43
- const actualIndex = startIndex + displayIndex;
44
- const isSelected = actualIndex === selectedIndex;
45
- return (_jsx(Box, { children: _jsx(Text, { color: isSelected ? "black" : "white", backgroundColor: isSelected ? "cyan" : undefined, children: fileItem.path }) }, fileItem.path));
46
- }), endIndex < files.length && (_jsxs(Text, { dimColor: true, children: ["... ", files.length - endIndex, " more files below"] })), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 to navigate, Enter/Tab to select, Escape to cancel" }) })] }));
40
+ const { startIndex, displayFiles } = getDisplayWindow();
41
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", borderBottom: false, borderLeft: false, borderRight: false, gap: 1, children: [_jsx(Box, { children: _jsxs(Text, { color: "cyan", bold: true, children: ["Select File/Directory ", searchQuery && `(filtering: "${searchQuery}")`] }) }), _jsx(Box, { flexDirection: "column", children: displayFiles.map((fileItem, displayIndex) => {
42
+ const actualIndex = startIndex + displayIndex;
43
+ const isSelected = actualIndex === selectedIndex;
44
+ return (_jsx(Box, { children: _jsxs(Text, { color: isSelected ? "black" : "white", backgroundColor: isSelected ? "cyan" : undefined, children: [isSelected ? "▶ " : " ", fileItem.path] }) }, fileItem.path));
45
+ }) }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: "\u2191\u2193 navigate \u2022 Enter/Tab select \u2022 Esc cancel" }) })] }));
47
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MarketplaceDetail.d.ts","sourceRoot":"","sources":["../../src/components/MarketplaceDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAwGrC,CAAC"}
1
+ {"version":3,"file":"MarketplaceDetail.d.ts","sourceRoot":"","sources":["../../src/components/MarketplaceDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAmHrC,CAAC"}
@@ -40,7 +40,7 @@ export const MarketplaceDetail = () => {
40
40
  if (!marketplace) {
41
41
  return (_jsx(Box, { children: _jsx(Text, { color: "red", children: "Marketplace not found." }) }));
42
42
  }
43
- return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: marketplace.name }), marketplace.isBuiltin && _jsx(Text, { dimColor: true, children: " (Built-in)" })] }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: ["Source: ", JSON.stringify(marketplace.source)] }) }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: ["Auto-update:", " ", _jsx(Text, { color: marketplace.autoUpdate ? "green" : "red", children: marketplace.autoUpdate ? "Enabled" : "Disabled" })] }) }), state.isLoading && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u231B Processing operation..." }) })), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Marketplace Actions:" }), ACTIONS.map((action, index) => (_jsxs(Text, { color: index === selectedActionIndex
43
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: marketplace.name }), marketplace.isBuiltin && _jsx(Text, { dimColor: true, children: " (Built-in)" })] }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: ["Source: ", JSON.stringify(marketplace.source)] }) }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: ["Auto-update:", " ", _jsx(Text, { color: marketplace.autoUpdate ? "green" : "red", children: marketplace.autoUpdate ? "Enabled" : "Disabled" })] }) }), marketplace.lastUpdated && (_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: ["Last updated:", " ", _jsx(Text, { color: "cyan", children: new Date(marketplace.lastUpdated).toLocaleString() })] }) })), state.isLoading && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u231B Processing operation..." }) })), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Marketplace Actions:" }), ACTIONS.map((action, index) => (_jsxs(Text, { color: index === selectedActionIndex
44
44
  ? state.isLoading
45
45
  ? "gray"
46
46
  : "yellow"
@@ -1 +1 @@
1
- {"version":3,"file":"MarketplaceList.d.ts","sourceRoot":"","sources":["../../src/components/MarketplaceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,UAAU,oBAAoB;IAC5B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0C1D,CAAC"}
1
+ {"version":3,"file":"MarketplaceList.d.ts","sourceRoot":"","sources":["../../src/components/MarketplaceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,UAAU,oBAAoB;IAC5B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgD1D,CAAC"}
@@ -11,6 +11,6 @@ export const MarketplaceList = ({ marketplaces, selectedIndex, }) => {
11
11
  : marketplace.source.source === "github"
12
12
  ? marketplace.source.repo
13
13
  : marketplace.source.url;
14
- return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: _jsxs(Text, { color: isSelected ? "cyan" : undefined, children: [isSelected ? "> " : " ", _jsx(Text, { bold: true, children: marketplace.name }), marketplace.isBuiltin && (_jsx(Text, { color: "yellow", children: " [Built-in]" }))] }) }), _jsx(Box, { marginLeft: 4, children: _jsxs(Text, { dimColor: true, children: ["Source: ", sourceStr] }) })] }, marketplace.name));
14
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: _jsxs(Text, { color: isSelected ? "cyan" : undefined, children: [isSelected ? "> " : " ", _jsx(Text, { bold: true, children: marketplace.name }), marketplace.isBuiltin && (_jsx(Text, { color: "yellow", children: " [Built-in]" }))] }) }), _jsxs(Box, { marginLeft: 4, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Source: ", sourceStr] }), marketplace.lastUpdated && (_jsxs(Text, { dimColor: true, children: ["Last updated:", " ", new Date(marketplace.lastUpdated).toLocaleString()] }))] })] }, marketplace.name));
15
15
  }) }));
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-code",
3
- "version": "0.9.5",
3
+ "version": "0.9.7",
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,7 @@
39
39
  "react": "^19.2.4",
40
40
  "react-dom": "19.2.4",
41
41
  "yargs": "^17.7.2",
42
- "wave-agent-sdk": "0.9.5"
42
+ "wave-agent-sdk": "0.9.7"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/react": "^19.1.8",
@@ -43,8 +43,11 @@ export async function listMarketplacesCommand() {
43
43
  sourceInfo = source.url + (source.ref ? `#${source.ref}` : "");
44
44
  }
45
45
  const builtinLabel = m.isBuiltin ? " [builtin]" : "";
46
+ const lastUpdatedLabel = m.lastUpdated
47
+ ? ` (Last updated: ${new Date(m.lastUpdated).toLocaleString()})`
48
+ : "";
46
49
  console.log(
47
- `- ${m.name}${builtinLabel}: ${sourceInfo} (${m.source.source})`,
50
+ `- ${m.name}${builtinLabel}: ${sourceInfo} (${m.source.source})${lastUpdatedLabel}`,
48
51
  );
49
52
  });
50
53
  }
@@ -69,7 +69,7 @@ export const FileSelector: React.FC<FileSelectorProps> = ({
69
69
  );
70
70
  }
71
71
 
72
- const maxDisplay = 10;
72
+ const maxDisplay = 5;
73
73
 
74
74
  // Calculate display window start and end positions
75
75
  const getDisplayWindow = () => {
@@ -77,20 +77,19 @@ export const FileSelector: React.FC<FileSelectorProps> = ({
77
77
  0,
78
78
  Math.min(
79
79
  selectedIndex - Math.floor(maxDisplay / 2),
80
- files.length - maxDisplay,
80
+ Math.max(0, files.length - maxDisplay),
81
81
  ),
82
82
  );
83
83
  const endIndex = Math.min(files.length, startIndex + maxDisplay);
84
- const adjustedStartIndex = Math.max(0, endIndex - maxDisplay);
85
84
 
86
85
  return {
87
- startIndex: adjustedStartIndex,
88
- endIndex: endIndex,
89
- displayFiles: files.slice(adjustedStartIndex, endIndex),
86
+ startIndex,
87
+ endIndex,
88
+ displayFiles: files.slice(startIndex, endIndex),
90
89
  };
91
90
  };
92
91
 
93
- const { startIndex, endIndex, displayFiles } = getDisplayWindow();
92
+ const { startIndex, displayFiles } = getDisplayWindow();
94
93
 
95
94
  return (
96
95
  <Box
@@ -100,42 +99,36 @@ export const FileSelector: React.FC<FileSelectorProps> = ({
100
99
  borderBottom={false}
101
100
  borderLeft={false}
102
101
  borderRight={false}
102
+ gap={1}
103
103
  >
104
- <Text color="cyan" bold>
105
- Select File/Directory {searchQuery && `(filtering: "${searchQuery}")`}
106
- </Text>
107
-
108
- {/* Show hint for more files above */}
109
- {startIndex > 0 && (
110
- <Text dimColor>... {startIndex} more files above</Text>
111
- )}
112
-
113
- {displayFiles.map((fileItem, displayIndex) => {
114
- const actualIndex = startIndex + displayIndex;
115
- const isSelected = actualIndex === selectedIndex;
116
-
117
- return (
118
- <Box key={fileItem.path}>
119
- <Text
120
- color={isSelected ? "black" : "white"}
121
- backgroundColor={isSelected ? "cyan" : undefined}
122
- >
123
- {fileItem.path}
124
- </Text>
125
- </Box>
126
- );
127
- })}
128
-
129
- {/* Show hint for more files below */}
130
- {endIndex < files.length && (
131
- <Text dimColor>... {files.length - endIndex} more files below</Text>
132
- )}
133
-
134
104
  <Box>
135
- <Text dimColor>
136
- Use ↑↓ to navigate, Enter/Tab to select, Escape to cancel
105
+ <Text color="cyan" bold>
106
+ Select File/Directory {searchQuery && `(filtering: "${searchQuery}")`}
137
107
  </Text>
138
108
  </Box>
109
+
110
+ <Box flexDirection="column">
111
+ {displayFiles.map((fileItem, displayIndex) => {
112
+ const actualIndex = startIndex + displayIndex;
113
+ const isSelected = actualIndex === selectedIndex;
114
+
115
+ return (
116
+ <Box key={fileItem.path}>
117
+ <Text
118
+ color={isSelected ? "black" : "white"}
119
+ backgroundColor={isSelected ? "cyan" : undefined}
120
+ >
121
+ {isSelected ? "▶ " : " "}
122
+ {fileItem.path}
123
+ </Text>
124
+ </Box>
125
+ );
126
+ })}
127
+ </Box>
128
+
129
+ <Box>
130
+ <Text dimColor>↑↓ navigate • Enter/Tab select • Esc cancel</Text>
131
+ </Box>
139
132
  </Box>
140
133
  );
141
134
  };
@@ -70,6 +70,17 @@ export const MarketplaceDetail: React.FC = () => {
70
70
  </Text>
71
71
  </Box>
72
72
 
73
+ {marketplace.lastUpdated && (
74
+ <Box marginBottom={1}>
75
+ <Text>
76
+ Last updated:{" "}
77
+ <Text color="cyan">
78
+ {new Date(marketplace.lastUpdated).toLocaleString()}
79
+ </Text>
80
+ </Text>
81
+ </Box>
82
+ )}
83
+
73
84
  {state.isLoading && (
74
85
  <Box marginBottom={1}>
75
86
  <Text color="yellow">⌛ Processing operation...</Text>
@@ -41,8 +41,14 @@ export const MarketplaceList: React.FC<MarketplaceListProps> = ({
41
41
  )}
42
42
  </Text>
43
43
  </Box>
44
- <Box marginLeft={4}>
44
+ <Box marginLeft={4} flexDirection="column">
45
45
  <Text dimColor>Source: {sourceStr}</Text>
46
+ {marketplace.lastUpdated && (
47
+ <Text dimColor>
48
+ Last updated:{" "}
49
+ {new Date(marketplace.lastUpdated).toLocaleString()}
50
+ </Text>
51
+ )}
46
52
  </Box>
47
53
  </Box>
48
54
  );