wave-code 0.6.5 → 0.7.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.
Files changed (55) hide show
  1. package/dist/cli.d.ts +1 -0
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/commands/plugin/disable.d.ts.map +1 -1
  5. package/dist/commands/plugin/disable.js +3 -10
  6. package/dist/commands/plugin/enable.d.ts.map +1 -1
  7. package/dist/commands/plugin/enable.js +3 -10
  8. package/dist/commands/plugin/install.d.ts.map +1 -1
  9. package/dist/commands/plugin/install.js +4 -11
  10. package/dist/commands/plugin/list.d.ts.map +1 -1
  11. package/dist/commands/plugin/list.js +5 -39
  12. package/dist/commands/plugin/marketplace.js +9 -9
  13. package/dist/commands/plugin/uninstall.d.ts.map +1 -1
  14. package/dist/commands/plugin/uninstall.js +4 -17
  15. package/dist/commands/plugin/update.js +3 -3
  16. package/dist/components/App.d.ts +1 -0
  17. package/dist/components/App.d.ts.map +1 -1
  18. package/dist/components/App.js +4 -4
  19. package/dist/components/BackgroundTaskManager.d.ts.map +1 -1
  20. package/dist/components/BackgroundTaskManager.js +14 -6
  21. package/dist/components/ConfirmationDetails.d.ts.map +1 -1
  22. package/dist/components/ConfirmationDetails.js +1 -5
  23. package/dist/components/DiffDisplay.d.ts.map +1 -1
  24. package/dist/components/DiffDisplay.js +2 -7
  25. package/dist/contexts/useChat.d.ts +1 -0
  26. package/dist/contexts/useChat.d.ts.map +1 -1
  27. package/dist/contexts/useChat.js +3 -1
  28. package/dist/hooks/usePluginManager.d.ts.map +1 -1
  29. package/dist/hooks/usePluginManager.js +20 -39
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +16 -0
  32. package/dist/print-cli.d.ts +1 -0
  33. package/dist/print-cli.d.ts.map +1 -1
  34. package/dist/print-cli.js +2 -1
  35. package/dist/utils/toolParameterTransforms.d.ts +1 -5
  36. package/dist/utils/toolParameterTransforms.d.ts.map +1 -1
  37. package/dist/utils/toolParameterTransforms.js +0 -11
  38. package/package.json +2 -2
  39. package/src/cli.tsx +3 -0
  40. package/src/commands/plugin/disable.ts +3 -17
  41. package/src/commands/plugin/enable.ts +3 -17
  42. package/src/commands/plugin/install.ts +4 -18
  43. package/src/commands/plugin/list.ts +5 -55
  44. package/src/commands/plugin/marketplace.ts +9 -9
  45. package/src/commands/plugin/uninstall.ts +4 -26
  46. package/src/commands/plugin/update.ts +3 -3
  47. package/src/components/App.tsx +10 -2
  48. package/src/components/BackgroundTaskManager.tsx +49 -32
  49. package/src/components/ConfirmationDetails.tsx +0 -6
  50. package/src/components/DiffDisplay.tsx +2 -16
  51. package/src/contexts/useChat.tsx +4 -0
  52. package/src/hooks/usePluginManager.ts +21 -57
  53. package/src/index.ts +17 -0
  54. package/src/print-cli.ts +3 -0
  55. package/src/utils/toolParameterTransforms.ts +0 -18
package/dist/cli.d.ts CHANGED
@@ -3,6 +3,7 @@ export interface CliOptions {
3
3
  continueLastSession?: boolean;
4
4
  bypassPermissions?: boolean;
5
5
  pluginDirs?: string[];
6
+ tools?: string[];
6
7
  }
7
8
  export declare function startCli(options: CliOptions): Promise<void>;
8
9
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA8EjE"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgFjE"}
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import { render } from "ink";
3
3
  import { App } from "./components/App.js";
4
4
  import { cleanupLogs } from "./utils/logger.js";
5
5
  export async function startCli(options) {
6
- const { restoreSessionId, continueLastSession, bypassPermissions, pluginDirs, } = options;
6
+ const { restoreSessionId, continueLastSession, bypassPermissions, pluginDirs, tools, } = options;
7
7
  // Continue with ink-based UI for normal mode
8
8
  // Global cleanup tracker
9
9
  let isCleaningUp = false;
@@ -45,7 +45,7 @@ export async function startCli(options) {
45
45
  cleanup();
46
46
  });
47
47
  // Render the application
48
- const { unmount } = render(_jsx(App, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, bypassPermissions: bypassPermissions, pluginDirs: pluginDirs }));
48
+ const { unmount } = render(_jsx(App, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, bypassPermissions: bypassPermissions, pluginDirs: pluginDirs, tools: tools }));
49
49
  // Store unmount function for cleanup when process exits normally
50
50
  process.on("exit", () => {
51
51
  if (!appUnmounted) {
@@ -1 +1 @@
1
- {"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/disable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,EACN,MAAM,gBAAgB,CAAC;AAExB,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBAwBA"}
1
+ {"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/disable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBAeA"}
@@ -1,16 +1,9 @@
1
- import { ConfigurationService, PluginManager, PluginScopeManager, } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function disablePluginCommand(argv) {
3
3
  const workdir = process.cwd();
4
- const configurationService = new ConfigurationService();
5
- const pluginManager = new PluginManager({ workdir });
6
- const scopeManager = new PluginScopeManager({
7
- workdir,
8
- configurationService,
9
- pluginManager,
10
- });
11
- const scope = argv.scope || scopeManager.findPluginScope(argv.plugin) || "user";
4
+ const pluginCore = new PluginCore(workdir);
12
5
  try {
13
- await scopeManager.disablePlugin(scope, argv.plugin);
6
+ const scope = await pluginCore.disablePlugin(argv.plugin, argv.scope);
14
7
  console.log(`Successfully disabled plugin: ${argv.plugin} in ${scope} scope`);
15
8
  process.exit(0);
16
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/enable.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,EACN,MAAM,gBAAgB,CAAC;AAExB,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBAwBA"}
1
+ {"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/enable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBAeA"}
@@ -1,16 +1,9 @@
1
- import { ConfigurationService, PluginManager, PluginScopeManager, } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function enablePluginCommand(argv) {
3
3
  const workdir = process.cwd();
4
- const configurationService = new ConfigurationService();
5
- const pluginManager = new PluginManager({ workdir });
6
- const scopeManager = new PluginScopeManager({
7
- workdir,
8
- configurationService,
9
- pluginManager,
10
- });
11
- const scope = argv.scope || scopeManager.findPluginScope(argv.plugin) || "user";
4
+ const pluginCore = new PluginCore(workdir);
12
5
  try {
13
- await scopeManager.enablePlugin(scope, argv.plugin);
6
+ const scope = await pluginCore.enablePlugin(argv.plugin, argv.scope);
14
7
  console.log(`Successfully enabled plugin: ${argv.plugin} in ${scope} scope`);
15
8
  process.exit(0);
16
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EACN,MAAM,gBAAgB,CAAC;AAExB,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBA+BA"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,iBAuBA"}
@@ -1,21 +1,14 @@
1
- import { MarketplaceService, ConfigurationService, PluginManager, PluginScopeManager, } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function installPluginCommand(argv) {
3
- const marketplaceService = new MarketplaceService();
4
3
  const workdir = process.cwd();
4
+ const pluginCore = new PluginCore(workdir);
5
5
  try {
6
- const installed = await marketplaceService.installPlugin(argv.plugin);
6
+ const installed = await pluginCore.installPlugin(argv.plugin);
7
7
  console.log(`Successfully installed plugin: ${installed.name} v${installed.version} from ${installed.marketplace}`);
8
8
  console.log(`Cache path: ${installed.cachePath}`);
9
9
  if (argv.scope) {
10
- const configurationService = new ConfigurationService();
11
- const pluginManager = new PluginManager({ workdir });
12
- const scopeManager = new PluginScopeManager({
13
- workdir,
14
- configurationService,
15
- pluginManager,
16
- });
17
10
  const pluginId = `${installed.name}@${installed.marketplace}`;
18
- await scopeManager.enablePlugin(argv.scope, pluginId);
11
+ await pluginCore.enablePlugin(pluginId, argv.scope);
19
12
  console.log(`Plugin ${pluginId} enabled in ${argv.scope} scope`);
20
13
  }
21
14
  process.exit(0);
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/list.ts"],"names":[],"mappings":"AAOA,wBAAsB,kBAAkB,kBA0EvC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/list.ts"],"names":[],"mappings":"AAEA,wBAAsB,kBAAkB,kBA6BvC"}
@@ -1,48 +1,14 @@
1
- import { MarketplaceService, ConfigurationService, PluginScopeManager, PluginManager, } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function listPluginsCommand() {
3
- const configurationService = new ConfigurationService();
4
- const marketplaceService = new MarketplaceService();
5
- const workdir = process.cwd();
6
- const pluginManager = new PluginManager({
7
- workdir,
8
- configurationService,
9
- });
10
- const pluginScopeManager = new PluginScopeManager({
11
- workdir,
12
- configurationService,
13
- pluginManager,
14
- });
3
+ const pluginCore = new PluginCore(process.cwd());
15
4
  try {
16
- const installedPlugins = await marketplaceService.getInstalledPlugins();
17
- const marketplaces = await marketplaceService.listMarketplaces();
18
- const mergedEnabled = configurationService.getMergedEnabledPlugins(workdir);
19
- // Collect all plugins from all marketplaces
20
- const allMarketplacePlugins = [];
21
- for (const m of marketplaces) {
22
- try {
23
- const manifest = await marketplaceService.loadMarketplaceManifest(marketplaceService.getMarketplacePath(m));
24
- manifest.plugins.forEach((p) => {
25
- const pluginId = `${p.name}@${m.name}`;
26
- const installed = installedPlugins.plugins.find((ip) => ip.name === p.name && ip.marketplace === m.name);
27
- allMarketplacePlugins.push({
28
- name: p.name,
29
- marketplace: m.name,
30
- installed: !!installed,
31
- version: installed?.version,
32
- scope: pluginScopeManager.findPluginScope(pluginId) || undefined,
33
- });
34
- });
35
- }
36
- catch {
37
- // Skip marketplaces that fail to load
38
- }
39
- }
40
- if (allMarketplacePlugins.length === 0) {
5
+ const { plugins, mergedEnabled } = await pluginCore.listPlugins();
6
+ if (plugins.length === 0) {
41
7
  console.log("No plugins found in registered marketplaces.");
42
8
  }
43
9
  else {
44
10
  console.log("Plugins:");
45
- allMarketplacePlugins.forEach((p) => {
11
+ plugins.forEach((p) => {
46
12
  const pluginId = `${p.name}@${p.marketplace}`;
47
13
  const isEnabled = mergedEnabled[pluginId] !== false;
48
14
  const status = p.installed
@@ -1,8 +1,8 @@
1
- import { MarketplaceService } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function addMarketplaceCommand(argv) {
3
- const service = new MarketplaceService();
3
+ const pluginCore = new PluginCore(process.cwd());
4
4
  try {
5
- const marketplace = await service.addMarketplace(argv.input);
5
+ const marketplace = await pluginCore.addMarketplace(argv.input);
6
6
  const source = marketplace.source;
7
7
  let sourceInfo = "";
8
8
  if (source.source === "directory") {
@@ -24,9 +24,9 @@ export async function addMarketplaceCommand(argv) {
24
24
  }
25
25
  }
26
26
  export async function listMarketplacesCommand() {
27
- const service = new MarketplaceService();
27
+ const pluginCore = new PluginCore(process.cwd());
28
28
  try {
29
- const marketplaces = await service.listMarketplaces();
29
+ const marketplaces = await pluginCore.listMarketplaces();
30
30
  if (marketplaces.length === 0) {
31
31
  console.log("No marketplaces registered.");
32
32
  }
@@ -57,9 +57,9 @@ export async function listMarketplacesCommand() {
57
57
  }
58
58
  }
59
59
  export async function removeMarketplaceCommand(argv) {
60
- const service = new MarketplaceService();
60
+ const pluginCore = new PluginCore(process.cwd());
61
61
  try {
62
- await service.removeMarketplace(argv.name);
62
+ await pluginCore.removeMarketplace(argv.name);
63
63
  console.log(`Successfully removed marketplace: ${argv.name}`);
64
64
  process.exit(0);
65
65
  }
@@ -70,12 +70,12 @@ export async function removeMarketplaceCommand(argv) {
70
70
  }
71
71
  }
72
72
  export async function updateMarketplaceCommand(argv) {
73
- const service = new MarketplaceService();
73
+ const pluginCore = new PluginCore(process.cwd());
74
74
  try {
75
75
  console.log(argv.name
76
76
  ? `Updating marketplace: ${argv.name}...`
77
77
  : "Updating all marketplaces...");
78
- await service.updateMarketplace(argv.name);
78
+ await pluginCore.updateMarketplace(argv.name);
79
79
  console.log("Successfully updated.");
80
80
  process.exit(0);
81
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/uninstall.ts"],"names":[],"mappings":"AAOA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,iBA+BpE"}
1
+ {"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/uninstall.ts"],"names":[],"mappings":"AAEA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,iBAcpE"}
@@ -1,24 +1,11 @@
1
- import { MarketplaceService, ConfigurationService, PluginManager, PluginScopeManager, } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function uninstallPluginCommand(argv) {
3
- const marketplaceService = new MarketplaceService();
4
3
  const workdir = process.cwd();
4
+ const pluginCore = new PluginCore(workdir);
5
5
  try {
6
- await marketplaceService.uninstallPlugin(argv.plugin, workdir);
6
+ await pluginCore.uninstallPlugin(argv.plugin);
7
7
  console.log(`Successfully uninstalled plugin: ${argv.plugin}`);
8
- const configurationService = new ConfigurationService();
9
- const pluginManager = new PluginManager({ workdir });
10
- const scopeManager = new PluginScopeManager({
11
- workdir,
12
- configurationService,
13
- pluginManager,
14
- });
15
- try {
16
- await scopeManager.removePluginFromAllScopes(argv.plugin);
17
- console.log(`Cleaned up plugin configuration from all scopes`);
18
- }
19
- catch (error) {
20
- console.warn(`Warning: Could not clean up all plugin configurations: ${error instanceof Error ? error.message : String(error)}`);
21
- }
8
+ console.log(`Cleaned up plugin configuration from all scopes`);
22
9
  process.exit(0);
23
10
  }
24
11
  catch (error) {
@@ -1,8 +1,8 @@
1
- import { MarketplaceService } from "wave-agent-sdk";
1
+ import { PluginCore } from "wave-agent-sdk";
2
2
  export async function updatePluginCommand(argv) {
3
- const marketplaceService = new MarketplaceService();
3
+ const pluginCore = new PluginCore(process.cwd());
4
4
  try {
5
- const updated = await marketplaceService.updatePlugin(argv.plugin);
5
+ const updated = await pluginCore.updatePlugin(argv.plugin);
6
6
  console.log(`Successfully updated plugin: ${updated.name} v${updated.version} from ${updated.marketplace}`);
7
7
  console.log(`Cache path: ${updated.cachePath}`);
8
8
  process.exit(0);
@@ -4,6 +4,7 @@ interface AppProps {
4
4
  continueLastSession?: boolean;
5
5
  bypassPermissions?: boolean;
6
6
  pluginDirs?: string[];
7
+ tools?: string[];
7
8
  }
8
9
  export declare const App: React.FC<AppProps>;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,QAAQ;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AA4DD,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAiBlC,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,QAAQ;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAiED,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAmBlC,CAAC"}
@@ -4,8 +4,8 @@ import { useStdout } from "ink";
4
4
  import { ChatInterface } from "./ChatInterface.js";
5
5
  import { ChatProvider, useChat } from "../contexts/useChat.js";
6
6
  import { AppProvider } from "../contexts/useAppConfig.js";
7
- const AppWithProviders = ({ bypassPermissions, pluginDirs }) => {
8
- return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, pluginDirs: pluginDirs, children: _jsx(ChatInterfaceWithRemount, {}) }));
7
+ const AppWithProviders = ({ bypassPermissions, pluginDirs, tools }) => {
8
+ return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, pluginDirs: pluginDirs, tools: tools, children: _jsx(ChatInterfaceWithRemount, {}) }));
9
9
  };
10
10
  const ChatInterfaceWithRemount = () => {
11
11
  const { stdout } = useStdout();
@@ -43,6 +43,6 @@ const ChatInterfaceWithRemount = () => {
43
43
  ]);
44
44
  return _jsx(ChatInterface, {}, remountKey);
45
45
  };
46
- export const App = ({ restoreSessionId, continueLastSession, bypassPermissions, pluginDirs, }) => {
47
- return (_jsx(AppProvider, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, children: _jsx(AppWithProviders, { bypassPermissions: bypassPermissions, pluginDirs: pluginDirs }) }));
46
+ export const App = ({ restoreSessionId, continueLastSession, bypassPermissions, pluginDirs, tools, }) => {
47
+ return (_jsx(AppProvider, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, children: _jsx(AppWithProviders, { bypassPermissions: bypassPermissions, pluginDirs: pluginDirs, tools: tools }) }));
48
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BackgroundTaskManager.d.ts","sourceRoot":"","sources":["../../src/components/BackgroundTaskManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA6StE,CAAC"}
1
+ {"version":3,"file":"BackgroundTaskManager.d.ts","sourceRoot":"","sources":["../../src/components/BackgroundTaskManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA8TtE,CAAC"}
@@ -6,6 +6,7 @@ export const BackgroundTaskManager = ({ onCancel, }) => {
6
6
  const { backgroundTasks, getBackgroundTaskOutput, stopBackgroundTask } = useChat();
7
7
  const [tasks, setTasks] = useState([]);
8
8
  const [selectedIndex, setSelectedIndex] = useState(0);
9
+ const MAX_VISIBLE_ITEMS = 3;
9
10
  const [viewMode, setViewMode] = useState("list");
10
11
  const [detailTaskId, setDetailTaskId] = useState(null);
11
12
  const [detailOutput, setDetailOutput] = useState(null);
@@ -43,6 +44,9 @@ export const BackgroundTaskManager = ({ onCancel, }) => {
43
44
  const stopTask = (taskId) => {
44
45
  stopBackgroundTask(taskId);
45
46
  };
47
+ // Calculate visible window
48
+ const startIndex = Math.max(0, Math.min(selectedIndex - Math.floor(MAX_VISIBLE_ITEMS / 2), Math.max(0, tasks.length - MAX_VISIBLE_ITEMS)));
49
+ const visibleTasks = tasks.slice(startIndex, startIndex + MAX_VISIBLE_ITEMS);
46
50
  useInput((input, key) => {
47
51
  if (viewMode === "list") {
48
52
  // List mode navigation
@@ -105,10 +109,14 @@ export const BackgroundTaskManager = ({ onCancel, }) => {
105
109
  if (tasks.length === 0) {
106
110
  return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", borderBottom: false, borderLeft: false, borderRight: false, paddingTop: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: "Background Tasks" }), _jsx(Text, { children: "No background tasks found" }), _jsx(Text, { dimColor: true, children: "Press Escape to close" })] }));
107
111
  }
108
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", borderBottom: false, borderLeft: false, borderRight: false, paddingTop: 1, gap: 1, children: [_jsx(Box, { children: _jsx(Text, { color: "cyan", bold: true, children: "Background Tasks" }) }), _jsx(Text, { dimColor: true, children: "Select a task to view details" }), tasks.map((task, index) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: index === selectedIndex ? "black" : "white", backgroundColor: index === selectedIndex ? "cyan" : undefined, children: [index === selectedIndex ? "▶ " : " ", index + 1, ". [", task.id, "] ", task.type, task.description ? `: ${task.description}` : "", _jsxs(Text, { color: task.status === "running"
109
- ? "green"
110
- : task.status === "completed"
111
- ? "blue"
112
- : "red", children: [" ", "(", task.status, ")"] })] }), index === selectedIndex && (_jsx(Box, { marginLeft: 4, flexDirection: "column", children: _jsxs(Text, { color: "gray", dimColor: true, children: ["Started: ", formatTime(task.startTime), task.runtime !== undefined &&
113
- ` | Runtime: ${formatDuration(task.runtime)}`, task.exitCode !== undefined && ` | Exit: ${task.exitCode}`] }) }))] }, task.id))), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["\u2191/\u2193 to select \u00B7 Enter to view \u00B7", " ", tasks[selectedIndex]?.status === "running" ? "k to stop · " : "", "Esc to close"] }) })] }));
112
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", borderBottom: false, borderLeft: false, borderRight: false, paddingTop: 1, gap: 1, children: [_jsx(Box, { children: _jsx(Text, { color: "cyan", bold: true, children: "Background Tasks" }) }), _jsx(Text, { dimColor: true, children: "Select a task to view details" }), _jsx(Box, { flexDirection: "column", children: visibleTasks.map((task, index) => {
113
+ const actualIndex = startIndex + index;
114
+ const isSelected = actualIndex === selectedIndex;
115
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: isSelected ? "black" : "white", backgroundColor: isSelected ? "cyan" : undefined, children: [isSelected ? "▶ " : " ", actualIndex + 1, ". [", task.id, "] ", task.type, task.description ? `: ${task.description}` : "", _jsxs(Text, { color: task.status === "running"
116
+ ? "green"
117
+ : task.status === "completed"
118
+ ? "blue"
119
+ : "red", children: [" ", "(", task.status, ")"] })] }), isSelected && (_jsx(Box, { marginLeft: 4, flexDirection: "column", children: _jsxs(Text, { color: "gray", dimColor: true, children: ["Started: ", formatTime(task.startTime), task.runtime !== undefined &&
120
+ ` | Runtime: ${formatDuration(task.runtime)}`, task.exitCode !== undefined && ` | Exit: ${task.exitCode}`] }) }))] }, task.id));
121
+ }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["\u2191/\u2193 to select \u00B7 Enter to view \u00B7", " ", tasks[selectedIndex]?.status === "running" ? "k to stop · " : "", "Esc to close"] }) })] }));
114
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationDetails.d.ts","sourceRoot":"","sources":["../../src/components/ConfirmationDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AA2CjE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAuDlE,CAAC"}
1
+ {"version":3,"file":"ConfirmationDetails.d.ts","sourceRoot":"","sources":["../../src/components/ConfirmationDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAqCjE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAuDlE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useLayoutEffect, useRef, useState } from "react";
3
3
  import { Box, Text, useStdout, measureElement, Static } from "ink";
4
- import { BASH_TOOL_NAME, EDIT_TOOL_NAME, MULTI_EDIT_TOOL_NAME, DELETE_FILE_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, ASK_USER_QUESTION_TOOL_NAME, } from "wave-agent-sdk";
4
+ import { BASH_TOOL_NAME, EDIT_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, ASK_USER_QUESTION_TOOL_NAME, } from "wave-agent-sdk";
5
5
  import { DiffDisplay } from "./DiffDisplay.js";
6
6
  import { PlanDisplay } from "./PlanDisplay.js";
7
7
  // Helper function to generate descriptive action text
@@ -14,10 +14,6 @@ const getActionDescription = (toolName, toolInput) => {
14
14
  return `Execute command: ${toolInput.command || "unknown command"}`;
15
15
  case EDIT_TOOL_NAME:
16
16
  return `Edit file: ${toolInput.file_path || "unknown file"}`;
17
- case MULTI_EDIT_TOOL_NAME:
18
- return `Edit multiple sections in: ${toolInput.file_path || "unknown file"}`;
19
- case DELETE_FILE_TOOL_NAME:
20
- return `Delete file: ${toolInput.target_file || "unknown file"}`;
21
17
  case WRITE_TOOL_NAME:
22
18
  return `Write to file: ${toolInput.file_path || "unknown file"}`;
23
19
  case EXIT_PLAN_MODE_TOOL_NAME:
@@ -1 +1 @@
1
- {"version":3,"file":"DiffDisplay.d.ts","sourceRoot":"","sources":["../../src/components/DiffDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAUvC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkTlD,CAAC"}
1
+ {"version":3,"file":"DiffDisplay.d.ts","sourceRoot":"","sources":["../../src/components/DiffDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwSlD,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo } from "react";
3
3
  import { Box, Text } from "ink";
4
- import { WRITE_TOOL_NAME, EDIT_TOOL_NAME, MULTI_EDIT_TOOL_NAME, } from "wave-agent-sdk";
4
+ import { WRITE_TOOL_NAME, EDIT_TOOL_NAME } from "wave-agent-sdk";
5
5
  import { transformToolBlockToChanges } from "../utils/toolParameterTransforms.js";
6
6
  import { diffLines, diffWords } from "diff";
7
7
  export const DiffDisplay = ({ toolName, parameters, }) => {
8
- const showDiff = toolName &&
9
- [WRITE_TOOL_NAME, EDIT_TOOL_NAME, MULTI_EDIT_TOOL_NAME].includes(toolName);
8
+ const showDiff = toolName && [WRITE_TOOL_NAME, EDIT_TOOL_NAME].includes(toolName);
10
9
  // Diff detection and transformation using typed parameters
11
10
  const changes = useMemo(() => {
12
11
  if (!showDiff || !toolName || !parameters)
@@ -62,10 +61,6 @@ export const DiffDisplay = ({ toolName, parameters, }) => {
62
61
  const allElements = [];
63
62
  changes.forEach((change, changeIndex) => {
64
63
  try {
65
- // Add ellipsis between non-contiguous edits in MultiEdit
66
- if (toolName === MULTI_EDIT_TOOL_NAME && changeIndex > 0) {
67
- allElements.push(_jsx(Box, { children: _jsx(Text, { color: "gray", children: "..." }) }, `multi-edit-separator-${changeIndex}`));
68
- }
69
64
  // Get line-level diff to understand the structure
70
65
  const lineDiffs = diffLines(change.oldContent || "", change.newContent || "");
71
66
  // Process line diffs
@@ -58,6 +58,7 @@ export interface ChatProviderProps {
58
58
  children: React.ReactNode;
59
59
  bypassPermissions?: boolean;
60
60
  pluginDirs?: string[];
61
+ tools?: string[];
61
62
  }
62
63
  export declare const ChatProvider: React.FC<ChatProviderProps>;
63
64
  //# sourceMappingURL=useChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/contexts/useChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACf,MAAM,gBAAgB,CAAC;AAUxB,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IAEvB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,CAAC,OAAO,EAAE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qBAAqB,EAAE,MAAM,CAAC;IAC9B,wBAAwB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CACxE;AAID,eAAO,MAAM,OAAO,uBAMnB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyepD,CAAC"}
@@ -13,7 +13,7 @@ export const useChat = () => {
13
13
  }
14
14
  return context;
15
15
  };
16
- export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
16
+ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, tools, }) => {
17
17
  const { restoreSessionId, continueLastSession } = useAppConfig();
18
18
  // Message Display State
19
19
  const [isExpanded, setIsExpanded] = useState(false);
@@ -139,6 +139,7 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
139
139
  canUseTool: permissionCallback,
140
140
  stream: false, // 关闭流式模式
141
141
  plugins: pluginDirs?.map((path) => ({ type: "local", path })),
142
+ tools,
142
143
  });
143
144
  agentRef.current = agent;
144
145
  // Get initial state
@@ -167,6 +168,7 @@ export const ChatProvider = ({ children, bypassPermissions, pluginDirs, }) => {
167
168
  bypassPermissions,
168
169
  showConfirmation,
169
170
  pluginDirs,
171
+ tools,
170
172
  ]);
171
173
  // Cleanup on unmount
172
174
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"usePluginManager.d.ts","sourceRoot":"","sources":["../../src/hooks/usePluginManager.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAE7C,wBAAgB,gBAAgB,IAAI,wBAAwB,CA6R3D"}
1
+ {"version":3,"file":"usePluginManager.d.ts","sourceRoot":"","sources":["../../src/hooks/usePluginManager.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAE7C,wBAAgB,gBAAgB,IAAI,wBAAwB,CA4P3D"}