Skip to content

Commit 8a652c9

Browse files
committed
lint
1 parent f3a9260 commit 8a652c9

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

apps/twig/src/main/trpc/routers/agent.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ export const agentRouter = router({
5353
.output(sessionResponseSchema.nullable())
5454
.mutation(({ input }) => getService().reconnectSession(input)),
5555

56-
updateToken: publicProcedure
57-
.input(tokenUpdateInput)
58-
.mutation(({ input }) => {
59-
getService().updateToken(input.token);
60-
}),
56+
updateToken: publicProcedure.input(tokenUpdateInput).mutation(({ input }) => {
57+
getService().updateToken(input.token);
58+
}),
6159

6260
setModel: publicProcedure
6361
.input(setModelInput)
@@ -139,7 +137,6 @@ export const agentRouter = router({
139137
getService().notifySessionContext(input.sessionId, input.context),
140138
),
141139

142-
// Developer tool: mark all sessions for recreation (tests token refresh flow)
143140
markAllForRecreation: publicProcedure.mutation(() =>
144141
getService().markAllSessionsForRecreation(),
145142
),

apps/twig/src/renderer/features/auth/stores/authStore.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ export const useAuthStore = create<AuthState>()(
261261

262262
trpcVanilla.agent.updateToken
263263
.mutate({ token: tokenResponse.access_token })
264-
.catch((err) => log.warn("Failed to update agent token", err));
264+
.catch((err) =>
265+
log.warn("Failed to update agent token", err),
266+
);
265267

266268
get().scheduleTokenRefresh();
267269
return; // Success
@@ -407,7 +409,9 @@ export const useAuthStore = create<AuthState>()(
407409

408410
trpcVanilla.agent.updateToken
409411
.mutate({ token: currentTokens.accessToken })
410-
.catch((err) => log.warn("Failed to update agent token", err));
412+
.catch((err) =>
413+
log.warn("Failed to update agent token", err),
414+
);
411415

412416
get().scheduleTokenRefresh();
413417

apps/twig/src/renderer/features/sessions/stores/sessionStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,4 +1359,4 @@ export const useCurrentModeForTask = (
13591359
);
13601360
return session?.currentMode;
13611361
});
1362-
};
1362+
};

scripts/test-access-token.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ async function validateToken(token, region, projectId) {
2626
console.log("-".repeat(60));
2727

2828
// Test 1: Get tasks
29-
console.log(`\n1. GET /api/projects/${projectId}/tasks/?limit=500&created_by=1`);
29+
console.log(
30+
`\n1. GET /api/projects/${projectId}/tasks/?limit=500&created_by=1`,
31+
);
3032
try {
3133
const response = await fetch(
3234
`${cloudUrl}/api/projects/${projectId}/tasks/?limit=500&created_by=1`,
@@ -35,7 +37,7 @@ async function validateToken(token, region, projectId) {
3537
Authorization: `Bearer ${token}`,
3638
"Content-Type": "application/json",
3739
},
38-
}
40+
},
3941
);
4042

4143
if (!response.ok) {
@@ -60,7 +62,7 @@ async function validateToken(token, region, projectId) {
6062
Authorization: `Bearer ${token}`,
6163
"Content-Type": "application/json",
6264
},
63-
}
65+
},
6466
);
6567

6668
if (!response.ok) {
@@ -75,14 +77,16 @@ async function validateToken(token, region, projectId) {
7577
console.log(` ERROR: ${error.message}`);
7678
}
7779

78-
console.log("\n" + "-".repeat(60));
80+
console.log(`\n${"-".repeat(60)}`);
7981
}
8082

8183
// Main
8284
const args = process.argv.slice(2);
8385

8486
if (args.length < 2) {
85-
console.log("Usage: node scripts/test-access-token.js <access_token> <project_id> [region]");
87+
console.log(
88+
"Usage: node scripts/test-access-token.js <access_token> <project_id> [region]",
89+
);
8690
console.log("");
8791
console.log("Arguments:");
8892
console.log(" access_token Your OAuth access token");

0 commit comments

Comments
 (0)