Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"server:dev": "tsx --tsconfig server/tsconfig.json server/index.js",
"server:dev-watch": "tsx watch --tsconfig server/tsconfig.json server/index.js",
"client": "vite",
"test:server": "tsx --tsconfig server/tsconfig.json --test \"server/**/*.test.ts\"",
"build": "npm run build:client && npm run build:server",
"build:client": "vite build",
"prebuild:server": "node -e \"require('node:fs').rmSync('dist-server', { recursive: true, force: true })\"",
Expand Down
1 change: 1 addition & 0 deletions public/api-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ <h4>Branch & PR Response</h4>
{ id: 'gemini', name: 'Google' },
{ id: 'cursor', name: 'Cursor' },
{ id: 'opencode', name: 'OpenCode' },
{ id: 'kiro', name: 'AWS Kiro' },
];

async function populateModels() {
Expand Down
4 changes: 4 additions & 0 deletions public/icons/kiro-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/kiro.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ import {
isOpenCodeSessionActive,
getActiveOpenCodeSessions,
} from './opencode-cli.js';
import {
spawnKiro,
abortKiroSession,
isKiroSessionActive,
getActiveKiroSessions,
} from './kiro-cli.js';
import sessionManager from './sessionManager.js';
import {
stripAnsiSequences,
Expand Down Expand Up @@ -110,24 +116,28 @@ const wss = createWebSocketServer(server, {
queryCodex,
spawnGemini,
spawnOpenCode,
spawnKiro,
abortClaudeSDKSession,
abortCursorSession,
abortCodexSession,
abortGeminiSession,
abortOpenCodeSession,
abortKiroSession,
resolveToolApproval,
isClaudeSDKSessionActive,
isCursorSessionActive,
isCodexSessionActive,
isGeminiSessionActive,
isOpenCodeSessionActive,
isKiroSessionActive,
reconnectSessionWriter,
getPendingApprovalsForSession,
getActiveClaudeSDKSessions,
getActiveCursorSessions,
getActiveCodexSessions,
getActiveGeminiSessions,
getActiveOpenCodeSessions,
getActiveKiroSessions,
},
shell: {
getSessionById: (sessionId) => sessionManager.getSession(sessionId),
Expand Down Expand Up @@ -1221,6 +1231,20 @@ app.get('/api/projects/:projectId/sessions/:sessionId/token-usage', authenticate
});
}

// Kiro sessions report `context_usage_percentage` per turn but not a
// running total/used pair compatible with this endpoint. Defer accurate
// accounting to a follow-up; the UI will treat Kiro as "no budget" for
// now (parity with Cursor/Gemini).
if (provider === 'kiro') {
return res.json({
used: 0,
total: 0,
breakdown: { input: 0, cacheCreation: 0, cacheRead: 0 },
unsupported: true,
message: 'Token usage tracking not available for Kiro sessions'
});
}

if (provider === 'opencode') {
const dbPath = getOpenCodeDatabasePath();
if (!fs.existsSync(dbPath)) {
Expand Down
Loading