wave-code 0.14.0 → 0.14.2
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.
- package/dist/components/BackgroundTaskManager.d.ts.map +1 -1
- package/dist/components/BackgroundTaskManager.js +36 -25
- package/dist/components/ChatInterface.js +2 -2
- package/dist/components/CompactDisplay.d.ts +9 -0
- package/dist/components/CompactDisplay.d.ts.map +1 -0
- package/dist/components/{CompressDisplay.js → CompactDisplay.js} +2 -2
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +2 -2
- package/dist/components/LoadingIndicator.d.ts +2 -2
- package/dist/components/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/LoadingIndicator.js +2 -2
- package/dist/components/MarketplaceAddForm.d.ts.map +1 -1
- package/dist/components/MarketplaceAddForm.js +48 -17
- package/dist/components/MarketplaceDetail.d.ts.map +1 -1
- package/dist/components/MarketplaceDetail.js +2 -1
- package/dist/components/MarketplaceList.d.ts.map +1 -1
- package/dist/components/MarketplaceList.js +2 -1
- package/dist/components/McpManager.d.ts.map +1 -1
- package/dist/components/McpManager.js +22 -27
- package/dist/components/MessageBlockItem.js +2 -2
- package/dist/components/PluginDetail.d.ts.map +1 -1
- package/dist/components/PluginDetail.js +22 -22
- package/dist/components/PluginManagerShell.d.ts +1 -0
- package/dist/components/PluginManagerShell.d.ts.map +1 -1
- package/dist/components/PluginManagerShell.js +2 -2
- package/dist/components/PluginManagerTypes.d.ts +2 -2
- package/dist/components/PluginManagerTypes.d.ts.map +1 -1
- package/dist/contexts/useChat.d.ts +2 -1
- package/dist/contexts/useChat.d.ts.map +1 -1
- package/dist/contexts/useChat.js +127 -100
- package/dist/hooks/usePluginManager.d.ts +3 -1
- package/dist/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/hooks/usePluginManager.js +16 -7
- package/dist/reducers/backgroundTaskManagerReducer.d.ts +43 -0
- package/dist/reducers/backgroundTaskManagerReducer.d.ts.map +1 -0
- package/dist/reducers/backgroundTaskManagerReducer.js +23 -0
- package/dist/reducers/marketplaceAddFormReducer.d.ts +24 -0
- package/dist/reducers/marketplaceAddFormReducer.d.ts.map +1 -0
- package/dist/reducers/marketplaceAddFormReducer.js +18 -0
- package/dist/reducers/mcpManagerReducer.d.ts +16 -0
- package/dist/reducers/mcpManagerReducer.d.ts.map +1 -0
- package/dist/reducers/mcpManagerReducer.js +15 -0
- package/dist/reducers/pluginDetailReducer.d.ts +25 -0
- package/dist/reducers/pluginDetailReducer.d.ts.map +1 -0
- package/dist/reducers/pluginDetailReducer.js +38 -0
- package/dist/utils/usageSummary.d.ts +1 -1
- package/dist/utils/usageSummary.d.ts.map +1 -1
- package/dist/utils/usageSummary.js +7 -7
- package/package.json +2 -2
- package/src/components/BackgroundTaskManager.tsx +32 -34
- package/src/components/ChatInterface.tsx +3 -3
- package/src/components/{CompressDisplay.tsx → CompactDisplay.tsx} +5 -5
- package/src/components/InputBox.tsx +7 -1
- package/src/components/LoadingIndicator.tsx +5 -5
- package/src/components/MarketplaceAddForm.tsx +76 -22
- package/src/components/MarketplaceDetail.tsx +4 -0
- package/src/components/MarketplaceList.tsx +4 -0
- package/src/components/McpManager.tsx +30 -34
- package/src/components/MessageBlockItem.tsx +3 -3
- package/src/components/PluginDetail.tsx +25 -33
- package/src/components/PluginManagerShell.tsx +3 -2
- package/src/components/PluginManagerTypes.ts +8 -2
- package/src/contexts/useChat.tsx +60 -26
- package/src/hooks/usePluginManager.ts +18 -7
- package/src/reducers/backgroundTaskManagerReducer.ts +60 -0
- package/src/reducers/marketplaceAddFormReducer.ts +35 -0
- package/src/reducers/mcpManagerReducer.ts +31 -0
- package/src/reducers/pluginDetailReducer.ts +58 -0
- package/src/utils/usageSummary.ts +8 -8
- package/dist/components/CompressDisplay.d.ts +0 -9
- package/dist/components/CompressDisplay.d.ts.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface PluginDetailState {
|
|
2
|
+
selectedScopeIndex: number;
|
|
3
|
+
selectedActionIndex: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type PluginDetailAction =
|
|
7
|
+
| { type: "SELECT_SCOPE_INDEX"; index: number }
|
|
8
|
+
| { type: "SELECT_ACTION_INDEX"; index: number }
|
|
9
|
+
| { type: "MOVE_SCOPE_UP"; maxIndex: number }
|
|
10
|
+
| { type: "MOVE_SCOPE_DOWN"; maxIndex: number }
|
|
11
|
+
| { type: "MOVE_ACTION_UP"; maxIndex: number }
|
|
12
|
+
| { type: "MOVE_ACTION_DOWN"; maxIndex: number };
|
|
13
|
+
|
|
14
|
+
export function pluginDetailReducer(
|
|
15
|
+
state: PluginDetailState,
|
|
16
|
+
action: PluginDetailAction,
|
|
17
|
+
): PluginDetailState {
|
|
18
|
+
switch (action.type) {
|
|
19
|
+
case "SELECT_SCOPE_INDEX":
|
|
20
|
+
return { ...state, selectedScopeIndex: action.index };
|
|
21
|
+
case "SELECT_ACTION_INDEX":
|
|
22
|
+
return { ...state, selectedActionIndex: action.index };
|
|
23
|
+
case "MOVE_SCOPE_UP":
|
|
24
|
+
return {
|
|
25
|
+
...state,
|
|
26
|
+
selectedScopeIndex:
|
|
27
|
+
state.selectedScopeIndex > 0
|
|
28
|
+
? state.selectedScopeIndex - 1
|
|
29
|
+
: action.maxIndex,
|
|
30
|
+
};
|
|
31
|
+
case "MOVE_SCOPE_DOWN":
|
|
32
|
+
return {
|
|
33
|
+
...state,
|
|
34
|
+
selectedScopeIndex:
|
|
35
|
+
state.selectedScopeIndex < action.maxIndex
|
|
36
|
+
? state.selectedScopeIndex + 1
|
|
37
|
+
: 0,
|
|
38
|
+
};
|
|
39
|
+
case "MOVE_ACTION_UP":
|
|
40
|
+
return {
|
|
41
|
+
...state,
|
|
42
|
+
selectedActionIndex:
|
|
43
|
+
state.selectedActionIndex > 0
|
|
44
|
+
? state.selectedActionIndex - 1
|
|
45
|
+
: action.maxIndex,
|
|
46
|
+
};
|
|
47
|
+
case "MOVE_ACTION_DOWN":
|
|
48
|
+
return {
|
|
49
|
+
...state,
|
|
50
|
+
selectedActionIndex:
|
|
51
|
+
state.selectedActionIndex < action.maxIndex
|
|
52
|
+
? state.selectedActionIndex + 1
|
|
53
|
+
: 0,
|
|
54
|
+
};
|
|
55
|
+
default:
|
|
56
|
+
return state;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface TokenSummary {
|
|
|
10
10
|
total_tokens: number;
|
|
11
11
|
operations: {
|
|
12
12
|
agent_calls: number;
|
|
13
|
-
|
|
13
|
+
compactions: number;
|
|
14
14
|
};
|
|
15
15
|
// Cache-related tokens (for Claude models)
|
|
16
16
|
cache_read_input_tokens?: number;
|
|
@@ -42,7 +42,7 @@ export function calculateTokenSummary(
|
|
|
42
42
|
total_tokens: 0,
|
|
43
43
|
operations: {
|
|
44
44
|
agent_calls: 0,
|
|
45
|
-
|
|
45
|
+
compactions: 0,
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -85,8 +85,8 @@ export function calculateTokenSummary(
|
|
|
85
85
|
// Track operation types
|
|
86
86
|
if (usage.operation_type === "agent") {
|
|
87
87
|
summary.operations.agent_calls += 1;
|
|
88
|
-
} else if (usage.operation_type === "
|
|
89
|
-
summary.operations.
|
|
88
|
+
} else if (usage.operation_type === "compact") {
|
|
89
|
+
summary.operations.compactions += 1;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -129,7 +129,7 @@ export function displayUsageSummary(
|
|
|
129
129
|
let totalCompletion = 0;
|
|
130
130
|
let totalTokens = 0;
|
|
131
131
|
let totalAgentCalls = 0;
|
|
132
|
-
let
|
|
132
|
+
let totalCompactions = 0;
|
|
133
133
|
let totalCacheRead = 0;
|
|
134
134
|
let totalCacheCreation = 0;
|
|
135
135
|
let totalCache5m = 0;
|
|
@@ -190,7 +190,7 @@ export function displayUsageSummary(
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
console.log(
|
|
193
|
-
` Operations: ${summary.operations.agent_calls} agent calls, ${summary.operations.
|
|
193
|
+
` Operations: ${summary.operations.agent_calls} agent calls, ${summary.operations.compactions} compactions`,
|
|
194
194
|
);
|
|
195
195
|
console.log();
|
|
196
196
|
|
|
@@ -198,7 +198,7 @@ export function displayUsageSummary(
|
|
|
198
198
|
totalCompletion += summary.completion_tokens;
|
|
199
199
|
totalTokens += summary.total_tokens;
|
|
200
200
|
totalAgentCalls += summary.operations.agent_calls;
|
|
201
|
-
|
|
201
|
+
totalCompactions += summary.operations.compactions;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
if (Object.keys(summaries).length > 1) {
|
|
@@ -228,7 +228,7 @@ export function displayUsageSummary(
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
console.log(
|
|
231
|
-
` Operations: ${totalAgentCalls} agent calls, ${
|
|
231
|
+
` Operations: ${totalAgentCalls} agent calls, ${totalCompactions} compactions`,
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { CompressBlock } from "wave-agent-sdk";
|
|
3
|
-
interface CompressDisplayProps {
|
|
4
|
-
block: CompressBlock;
|
|
5
|
-
isExpanded?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const CompressDisplay: React.FC<CompressDisplayProps>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=CompressDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CompressDisplay.d.ts","sourceRoot":"","sources":["../../src/components/CompressDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+B1D,CAAC"}
|