praxis-agent 0.17.0 → 0.17.1
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/cli/interactive.js +19 -2
- package/package.json +1 -1
package/dist/cli/interactive.js
CHANGED
|
@@ -21,7 +21,7 @@ import { createRecentlyDeniedStore, } from './tui/recently-denied.js';
|
|
|
21
21
|
import { agentColorMessage, parseAgentColorInput, } from '../compatibility/claude/agent-color.js';
|
|
22
22
|
import { filterTuiSlashCommands, mergeTuiSlashCommands, slashCommandQuery, } from './tui/slash-commands.js';
|
|
23
23
|
import { runDoctor } from '../maintenance/doctor.js';
|
|
24
|
-
import { canonicalClaudeCostModelName, } from './tui/cost-summary.js';
|
|
24
|
+
import { canonicalClaudeCostModelName, formatCostSummary, } from './tui/cost-summary.js';
|
|
25
25
|
import { createComposerEditor, deleteComposerBackward, deleteComposerForward, deleteComposerToEnd, deleteComposerToStart, deleteComposerWordBackward, insertComposerText, moveComposerCursor, moveComposerCursorByWord, } from './tui/composer-editor.js';
|
|
26
26
|
import { applyMentionReference, fileReferenceAtCursor, filterTuiMentionEntries, loadTuiFileEntries, } from './tui/file-picker.js';
|
|
27
27
|
import { editTuiPrompt, openTuiEditorFile, } from './tui/external-editor.js';
|
|
@@ -1718,6 +1718,23 @@ export function InteractiveApp({ factory, initialSessions, initialPrompt, initia
|
|
|
1718
1718
|
};
|
|
1719
1719
|
});
|
|
1720
1720
|
};
|
|
1721
|
+
const showCostSummary = (sessionId) => {
|
|
1722
|
+
const loading = (async () => {
|
|
1723
|
+
setBusy(true);
|
|
1724
|
+
try {
|
|
1725
|
+
const summary = await loadCostUsage(sessionId);
|
|
1726
|
+
append({ kind: 'local-result', text: formatCostSummary(summary) });
|
|
1727
|
+
}
|
|
1728
|
+
catch (error) {
|
|
1729
|
+
warn(error);
|
|
1730
|
+
}
|
|
1731
|
+
finally {
|
|
1732
|
+
setBusy(false);
|
|
1733
|
+
}
|
|
1734
|
+
})();
|
|
1735
|
+
onTurnChange?.(loading);
|
|
1736
|
+
void loading.finally(() => onTurnChange?.(null));
|
|
1737
|
+
};
|
|
1721
1738
|
const loadConfigMenuUsage = (generation, sessionId) => {
|
|
1722
1739
|
const requestId = ++configUsageRequestRef.current;
|
|
1723
1740
|
const loading = (async () => {
|
|
@@ -5453,7 +5470,7 @@ export function InteractiveApp({ factory, initialSessions, initialPrompt, initia
|
|
|
5453
5470
|
void loading.finally(() => onTurnChange?.(null));
|
|
5454
5471
|
}
|
|
5455
5472
|
else if (prompt === '/cost') {
|
|
5456
|
-
|
|
5473
|
+
showCostSummary(sessionIdRef.current);
|
|
5457
5474
|
}
|
|
5458
5475
|
else if (prompt === '/doctor') {
|
|
5459
5476
|
openDoctor();
|