@alpaca-editor/core 1.0.4123 → 1.0.4128
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/editor/ai/AgentCostDisplay.js +3 -1
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.js +349 -21
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.js +31 -10
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.d.ts +6 -0
- package/dist/editor/ai/ToolCallDisplay.js +118 -14
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/types.d.ts +5 -0
- package/dist/editor/services/agentService.d.ts +16 -0
- package/dist/editor/services/agentService.js +39 -11
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/ui/Splitter.js +72 -2
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/styles.css +25 -0
- package/package.json +1 -1
- package/src/editor/ai/AgentCostDisplay.tsx +3 -1
- package/src/editor/ai/AgentTerminal.tsx +494 -19
- package/src/editor/ai/ContextInfoBar.tsx +83 -58
- package/src/editor/ai/ToolCallDisplay.tsx +193 -11
- package/src/editor/ai/types.ts +6 -0
- package/src/editor/services/agentService.ts +69 -11
- package/src/editor/ui/Splitter.tsx +88 -2
- package/src/revision.ts +2 -2
package/package.json
CHANGED
|
@@ -71,7 +71,9 @@ export function AgentCostDisplay({
|
|
|
71
71
|
outputTokens: number,
|
|
72
72
|
cachedTokens: number,
|
|
73
73
|
) => {
|
|
74
|
-
|
|
74
|
+
// Cached tokens are a subset of input tokens, not additional tokens
|
|
75
|
+
const freshInputTokens = inputTokens - cachedTokens;
|
|
76
|
+
const inputCost = (freshInputTokens / 1000000) * 3; // $3 per million tokens
|
|
75
77
|
const outputCost = (outputTokens / 1000000) * 15; // $15 per million tokens
|
|
76
78
|
const cachedCost = (cachedTokens / 1000000) * 0.3; // Cached tokens are typically much cheaper
|
|
77
79
|
return {
|