Skip to content
Open
Show file tree
Hide file tree
Changes from all 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.
20 changes: 20 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ import {
spawnOpenCode,
abortOpenCodeSession,
} from './opencode-cli.js';
import {
spawnKiro,
abortKiroSession,
} from './kiro-cli.js';
import sessionManager from './sessionManager.js';
import {
stripAnsiSequences,
Expand Down Expand Up @@ -100,13 +104,15 @@ const wss = createWebSocketServer(server, {
codex: queryCodex,
gemini: spawnGemini,
opencode: spawnOpenCode,
kiro: spawnKiro,
},
abortFns: {
claude: abortClaudeSDKSession,
cursor: abortCursorSession,
codex: abortCodexSession,
gemini: abortGeminiSession,
opencode: abortOpenCodeSession,
kiro: abortKiroSession,
},
resolveToolApproval,
getPendingApprovalsForSession,
Expand Down Expand Up @@ -1224,6 +1230,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