Merge remote-tracking branch 'public-gh/master'

* public-gh/master:
  Default Gemini adapter to yolo mode and add API access prompt note
  fix: remove Cmd+1..9 company-switch shortcut
  fix(ui): prevent IME composition Enter from moving focus in new issue title
  fix(cli): add restart hint after allowed-hostname change
  docs: remove obsolete TODO for CONTRIBUTING.md
  fix: default dangerouslySkipPermissions to true for unattended agents
  fix: route heartbeat cost recording through costService
  Show issue creator in properties sidebar
This commit is contained in:
Dotta
2026-03-12 08:09:06 -05:00
17 changed files with 158 additions and 61 deletions

View File

@@ -9,7 +9,6 @@ import {
agentWakeupRequests,
heartbeatRunEvents,
heartbeatRuns,
costEvents,
issues,
projects,
projectWorkspaces,
@@ -22,6 +21,7 @@ import { getServerAdapter, runningProcesses } from "../adapters/index.js";
import type { AdapterExecutionResult, AdapterInvocationMeta, AdapterSessionCodec } from "../adapters/index.js";
import { createLocalAgentJwt } from "../agent-auth-jwt.js";
import { parseObject, asBoolean, asNumber, appendWithCap, MAX_EXCERPT_BYTES } from "../adapters/utils.js";
import { costService } from "./costs.js";
import { secretService } from "./secrets.js";
import { resolveDefaultAgentWorkspaceDir } from "../home-paths.js";
import { summarizeHeartbeatRunResultJson } from "./heartbeat-run-summary.js";
@@ -1029,8 +1029,8 @@ export function heartbeatService(db: Db) {
.where(eq(agentRuntimeState.agentId, agent.id));
if (additionalCostCents > 0 || hasTokenUsage) {
await db.insert(costEvents).values({
companyId: agent.companyId,
const costs = costService(db);
await costs.createEvent(agent.companyId, {
agentId: agent.id,
provider: result.provider ?? "unknown",
model: result.model ?? "unknown",
@@ -1040,16 +1040,6 @@ export function heartbeatService(db: Db) {
occurredAt: new Date(),
});
}
if (additionalCostCents > 0) {
await db
.update(agents)
.set({
spentMonthlyCents: sql`${agents.spentMonthlyCents} + ${additionalCostCents}`,
updatedAt: new Date(),
})
.where(eq(agents.id, agent.id));
}
}
async function startNextQueuedRunForAgent(agentId: string) {