style: apply biome formatting to merged changes

This commit is contained in:
can1357
2026-07-30 01:49:14 +02:00
parent 5e901c84d2
commit 1b25ff01a2
6 changed files with 33 additions and 17 deletions
+4 -1
View File
@@ -582,7 +582,10 @@ export class AdvisorRuntime {
.map(message => this.#dedupContextMessage(message));
if (delta.length === 0) return null;
const obfuscator = this.host.obfuscator;
let md = formatSessionHistoryMarkdown(delta, { ...ADVISOR_RENDER_OPTIONS, includeThinking: this.#includeThinking });
let md = formatSessionHistoryMarkdown(delta, {
...ADVISOR_RENDER_OPTIONS,
includeThinking: this.#includeThinking,
});
if (!md.trim()) return null;
if (obfuscator?.hasSecrets()) {
let discoveredNewRegexSecretValue = false;
@@ -1336,7 +1336,8 @@ export class StatusLineComponent implements Component {
if (candidate.scope?.windowId !== "7d" || typeof fraction !== "number" || !Number.isFinite(fraction)) {
continue;
}
const tier = typeof candidate.scope?.tier === "string" && candidate.scope.tier ? candidate.scope.tier : undefined;
const tier =
typeof candidate.scope?.tier === "string" && candidate.scope.tier ? candidate.scope.tier : undefined;
if (sevenDay && (sevenDayTier === undefined || tier)) continue;
const resetsAt = candidate.window?.resetsAt;
sevenDay = {
@@ -959,8 +959,7 @@ export class AgentSession {
scheduleAgentContinue: options => this.#scheduleAgentContinue(options),
waitForSessionMessagePersistence: message => this.#waitForSessionMessagePersistence(message),
appendSessionMessage: message => this.#appendSessionMessage(message),
persistedAssistantEntryId: message =>
(message as PersistedAssistantMessage)[kPersistedSessionEntryId],
persistedAssistantEntryId: message => (message as PersistedAssistantMessage)[kPersistedSessionEntryId],
sessionMessageAlreadyPersisted: message => this.#sessionMessageAlreadyPersisted(message),
setModelWithProviderSessionReset: model => this.#setModelWithProviderSessionReset(model),
resetCurrentResponsesProviderSession: reason => this.#resetCurrentResponsesProviderSession(reason),
@@ -778,9 +778,7 @@ export class TurnRecovery {
? undefined
: branch.find(
entry =>
entry.id === persistedEntryId &&
entry.type === "message" &&
entry.message.role === "assistant",
entry.id === persistedEntryId && entry.type === "message" && entry.message.role === "assistant",
)) ??
branch
.slice()
@@ -3497,7 +3497,12 @@ describe("advisor", () => {
return;
}
state.error = undefined;
state.messages.push({ role: "assistant", content: [], stopReason: "stop", timestamp: 3 } as AgentMessage);
state.messages.push({
role: "assistant",
content: [],
stopReason: "stop",
timestamp: 3,
} as AgentMessage);
},
abort: () => {},
reset: () => {},
@@ -3510,7 +3515,10 @@ describe("advisor", () => {
const messages = [
{
role: "assistant",
content: [{ type: "thinking", thinking: "private reasoning" }, { type: "text", text: "answer" }],
content: [
{ type: "thinking", thinking: "private reasoning" },
{ type: "text", text: "answer" },
],
timestamp: 1,
} as AgentMessage,
];
@@ -3562,7 +3570,10 @@ describe("advisor", () => {
const messages = [
{
role: "assistant",
content: [{ type: "thinking", thinking: "private reasoning" }, { type: "text", text: "answer" }],
content: [
{ type: "thinking", thinking: "private reasoning" },
{ type: "text", text: "answer" },
],
timestamp: 1,
} as AgentMessage,
];
@@ -3607,7 +3618,12 @@ describe("advisor", () => {
return;
}
state.error = undefined;
state.messages.push({ role: "assistant", content: [], stopReason: "stop", timestamp: 3 } as AgentMessage);
state.messages.push({
role: "assistant",
content: [],
stopReason: "stop",
timestamp: 3,
} as AgentMessage);
},
abort: () => {},
reset: () => {},
@@ -3620,7 +3636,10 @@ describe("advisor", () => {
const messages = [
{
role: "assistant",
content: [{ type: "thinking", thinking: "private reasoning" }, { type: "text", text: "answer" }],
content: [
{ type: "thinking", thinking: "private reasoning" },
{ type: "text", text: "answer" },
],
timestamp: 1,
} as AgentMessage,
];
@@ -505,11 +505,7 @@ describe("AgentSession empty stop guard", () => {
const commentary = "Codex commentary before the empty final answer.";
const recovered = "Recovered after the empty final-answer retry.";
const { session, mock } = await createHarness(
[
{ content: [commentary], stopReason: "stop" },
emptyStop(),
{ content: [recovered], stopReason: "stop" },
],
[{ content: [commentary], stopReason: "stop" }, emptyStop(), { content: [recovered], stopReason: "stop" }],
{},
{ provider: "openai-codex", id: "gpt-5.5-codex" },
);