Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/sdk-typescript/src/daemon/acpRouteTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@
// prevents route inconsistencies between the two transport variants.
// ---------------------------------------------------------------------------

import { isRecord } from './acpTransportUtils.js';

const REQUESTED_SESSION_ID_META_KEY = 'qwen-code/sessionId';

// Kept local (instead of reusing `isRecord` from `acpTransportUtils.ts`):
// acpTransportUtils imports this module's ROUTE_TABLE, so re-importing the
// predicate from there would silently restore the
// acpRouteTable -> acpTransportUtils -> acpRouteTable runtime cycle this
// change exists to break. ESM cycles compile and test green, so the guard is
// this comment — do not consolidate without breaking the cycle some other
// way first.
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
Comment thread
DragonnZhang marked this conversation as resolved.

export interface RouteMapping {
method: string;
/**
Expand Down
Loading