mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-03 15:43:11 +08:00
fix(tests): add test for disabling all tools in CcwToolsMcpCard component
fix(api): handle empty enabledTools array and improve default tool logic fix(queueScheduler): ignore network errors in loadInitialState fix(auth): ensure token generation handles max session capacity chore(dependencies): update package requirements to use compatible version specifiers chore(tests): add new test cases for incremental indexer and migrations
This commit is contained in:
@@ -100,14 +100,16 @@ export async function handleAuthRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
} else {
|
||||
// Batch token response (pool pattern)
|
||||
const tokens = tokenManager.generateTokens(sessionId, count);
|
||||
const firstToken = tokens[0];
|
||||
|
||||
// If no tokens generated (session at max capacity), force generate one
|
||||
const firstToken = tokens.length > 0 ? tokens[0] : tokenManager.generateToken(sessionId);
|
||||
|
||||
// Set header and cookie with first token for compatibility
|
||||
res.setHeader('X-CSRF-Token', firstToken);
|
||||
setCsrfCookie(res, firstToken, 15 * 60);
|
||||
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
||||
res.end(JSON.stringify({
|
||||
tokens,
|
||||
tokens: tokens.length > 0 ? tokens : [firstToken],
|
||||
expiresIn: 15 * 60, // seconds
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user