Skip to content

Commit 2eade74

Browse files
committed
refactor: enhance preflightPayload type definition for clarity
Updated the type definition of preflightPayload in index.ts to improve readability and maintainability. The new structure explicitly outlines the possible types, ensuring better understanding of the variable's usage in the context of preflight handling.
1 parent 6561617 commit 2eade74

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
11921192

11931193
// For edit/refactor/migrate: return full preflight card (risk, patterns, impact, etc.).
11941194
// For explore or lite-only: return flattened { ready, reason }.
1195-
let preflightPayload: { ready: boolean; reason?: string } | Record<string, unknown> | undefined;
1195+
let preflightPayload:
1196+
| { ready: boolean; reason?: string }
1197+
| Record<string, unknown>
1198+
| undefined;
11961199
if (preflight) {
11971200
const el = preflight.evidenceLock;
11981201
// Full card per tool schema; add top-level ready/reason for backward compatibility

0 commit comments

Comments
 (0)