Skip to content

Commit 7d74c98

Browse files
committed
lint
1 parent fd9a3f2 commit 7d74c98

3 files changed

Lines changed: 39 additions & 11 deletions

File tree

apps/twig/src/renderer/features/sessions/service/service.ts

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ export class SessionService {
210210

211211
if (!getIsOnline()) {
212212
log.info("Skipping connection attempt - offline", { taskId });
213-
const session = this.createBaseSession(latestRun.id, taskId, taskTitle);
213+
const session = this.createBaseSession(
214+
latestRun.id,
215+
taskId,
216+
taskTitle,
217+
);
214218
session.status = "disconnected";
215219
session.errorMessage =
216220
"No internet connection. Connect when you're back online.";
@@ -281,10 +285,14 @@ export class SessionService {
281285
logUrl: string,
282286
repoPath: string,
283287
auth: AuthCredentials,
284-
prefetchedLogs?: { rawEntries: StoredLogEntry[]; sessionId?: string; adapter?: Adapter },
288+
prefetchedLogs?: {
289+
rawEntries: StoredLogEntry[];
290+
sessionId?: string;
291+
adapter?: Adapter;
292+
},
285293
): Promise<void> {
286294
const { rawEntries, sessionId, adapter } =
287-
prefetchedLogs ?? await this.fetchSessionLogs(logUrl);
295+
prefetchedLogs ?? (await this.fetchSessionLogs(logUrl));
288296
const events = convertStoredEntriesToEvents(rawEntries);
289297

290298
// Resolve adapter from logs or persisted store
@@ -531,14 +539,22 @@ export class SessionService {
531539
const configPromises: Promise<void>[] = [];
532540
if (preferredModel) {
533541
configPromises.push(
534-
this.setSessionConfigOptionByCategory(taskId, "model", preferredModel)
535-
.catch((err) => log.warn("Failed to set model", { taskId, err })),
542+
this.setSessionConfigOptionByCategory(
543+
taskId,
544+
"model",
545+
preferredModel,
546+
).catch((err) => log.warn("Failed to set model", { taskId, err })),
536547
);
537548
}
538549
if (reasoningLevel) {
539550
configPromises.push(
540-
this.setSessionConfigOptionByCategory(taskId, "thought_level", reasoningLevel)
541-
.catch((err) => log.warn("Failed to set reasoning level", { taskId, err })),
551+
this.setSessionConfigOptionByCategory(
552+
taskId,
553+
"thought_level",
554+
reasoningLevel,
555+
).catch((err) =>
556+
log.warn("Failed to set reasoning level", { taskId, err }),
557+
),
542558
);
543559
}
544560
if (configPromises.length > 0) {

apps/twig/src/renderer/sagas/task/task-creation.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,14 @@ export class TaskCreationSaga extends Saga<
202202
task,
203203
repoPath: agentCwd ?? "",
204204
...(initialPrompt ? { initialPrompt } : {}),
205-
...(input.executionMode ? { executionMode: input.executionMode } : {}),
205+
...(input.executionMode
206+
? { executionMode: input.executionMode }
207+
: {}),
206208
...(input.adapter ? { adapter: input.adapter } : {}),
207209
...(input.model ? { model: input.model } : {}),
208-
...(input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : {}),
210+
...(input.reasoningLevel
211+
? { reasoningLevel: input.reasoningLevel }
212+
: {}),
209213
});
210214
return { taskId: task.id };
211215
},

packages/agent/src/gateway-models.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export async function fetchGatewayModels(
6161

6262
const data = (await response.json()) as GatewayModelsResponse;
6363
const models = (data.data ?? []).filter((m) => !BLOCKED_MODELS.has(m.id));
64-
gatewayModelsCache = { models, expiry: Date.now() + CACHE_TTL, url: gatewayUrl };
64+
gatewayModelsCache = {
65+
models,
66+
expiry: Date.now() + CACHE_TTL,
67+
url: gatewayUrl,
68+
};
6569
return models;
6670
} catch {
6771
return [];
@@ -128,7 +132,11 @@ export async function fetchArrayModels(
128132
if (!id) continue;
129133
results.push({ id, owned_by: model?.owned_by });
130134
}
131-
arrayModelsCache = { models: results, expiry: Date.now() + CACHE_TTL, url: gatewayUrl };
135+
arrayModelsCache = {
136+
models: results,
137+
expiry: Date.now() + CACHE_TTL,
138+
url: gatewayUrl,
139+
};
132140
return results;
133141
} catch {
134142
return [];

0 commit comments

Comments
 (0)