wave-code 1.1.5 → 1.3.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 (46) hide show
  1. package/dist/bundle/wave.mjs +1075 -613
  2. package/package.json +4 -3
  3. package/src/cli.tsx +9 -0
  4. package/src/commands/plugin/install.ts +6 -7
  5. package/src/commands/plugin/uninstall.ts +11 -5
  6. package/src/components/ChatInterface.tsx +3 -0
  7. package/src/components/ConfirmationDetails.tsx +36 -15
  8. package/src/components/ConfirmationSelector.tsx +39 -0
  9. package/src/components/HooksManager.tsx +286 -0
  10. package/src/components/InputBox.tsx +125 -51
  11. package/src/components/Markdown.tsx +21 -8
  12. package/src/components/MarketplaceDetail.tsx +10 -27
  13. package/src/components/MarketplaceView.tsx +17 -3
  14. package/src/components/MessageBlockItem.tsx +0 -5
  15. package/src/components/MessageList.tsx +0 -1
  16. package/src/components/Notifications.tsx +7 -0
  17. package/src/components/PlanView.tsx +146 -0
  18. package/src/components/PluginManagerShell.tsx +3 -3
  19. package/src/components/PluginManagerTypes.ts +2 -1
  20. package/src/components/ResumeCommand.tsx +84 -0
  21. package/src/components/ScrolledContent.tsx +71 -0
  22. package/src/components/SessionSelector.tsx +184 -6
  23. package/src/components/SessionSelectorFlow.tsx +246 -0
  24. package/src/constants/commands.ts +30 -0
  25. package/src/contexts/useChat.tsx +252 -98
  26. package/src/daemon/commands.ts +1046 -67
  27. package/src/daemon-cli.ts +6 -0
  28. package/src/hooks/useInputManager.ts +30 -0
  29. package/src/hooks/useLineScroll.ts +58 -0
  30. package/src/hooks/usePluginManager.ts +104 -78
  31. package/src/index.ts +156 -16
  32. package/src/managers/inputHandlers.ts +16 -9
  33. package/src/managers/inputReducer.ts +39 -9
  34. package/src/reducers/confirmationReducer.ts +20 -1
  35. package/src/reducers/hooksManagerReducer.ts +92 -0
  36. package/src/reducers/selectorReducer.ts +3 -0
  37. package/src/session-selector-cli.tsx +9 -255
  38. package/src/stdio/agentBridge.ts +932 -133
  39. package/src/stdio/daemonServer.ts +26 -82
  40. package/src/stdio/protocol.ts +23 -4
  41. package/src/stdio-cli.ts +60 -0
  42. package/src/utils/rewindCheckpoints.ts +2 -2
  43. package/src/utils/sessionOwnership.ts +62 -0
  44. package/src/utils/worktree.ts +175 -50
  45. package/src/components/BangDisplay.tsx +0 -41
  46. package/src/components/PlanDisplay.tsx +0 -18
@@ -1,41 +0,0 @@
1
- import React from "react";
2
- import { Box, Text } from "ink";
3
- import type { BangBlock } from "wave-agent-sdk";
4
- import { getLastLines } from "wave-agent-sdk";
5
-
6
- interface BangDisplayProps {
7
- block: BangBlock;
8
- isExpanded?: boolean;
9
- }
10
-
11
- export const BangDisplay: React.FC<BangDisplayProps> = ({
12
- block,
13
- isExpanded = false,
14
- }) => {
15
- const { command, output, stage, exitCode } = block;
16
- const MAX_LINES = 3; // Set maximum display lines
17
-
18
- const getStatusColor = () => {
19
- if (stage === "running") return "yellow";
20
- if (exitCode === 0) return "green";
21
- if (exitCode !== null && exitCode !== 0) return "red";
22
- return "gray"; // Unknown state
23
- };
24
-
25
- return (
26
- <Box flexDirection="column">
27
- <Box>
28
- <Text color={getStatusColor()}>! </Text>
29
- <Text color="white">{command}</Text>
30
- </Box>
31
-
32
- {output && (
33
- <Box paddingLeft={2} overflow="hidden">
34
- <Text color="gray">
35
- {isExpanded ? output : getLastLines(output, MAX_LINES)}
36
- </Text>
37
- </Box>
38
- )}
39
- </Box>
40
- );
41
- };
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { Box } from "ink";
3
- import { Markdown } from "./Markdown.js";
4
-
5
- interface PlanDisplayProps {
6
- plan: string;
7
- isExpanded?: boolean;
8
- }
9
-
10
- export const PlanDisplay: React.FC<PlanDisplayProps> = ({ plan }) => {
11
- return (
12
- <Box flexDirection="column" marginTop={1}>
13
- <Box flexDirection="column">
14
- <Markdown>{plan}</Markdown>
15
- </Box>
16
- </Box>
17
- );
18
- };