Skip to content

Commit a8b3948

Browse files
committed
fix: convert AGUI dynamic import to static in invokeForProtocol
AGENTS.md requires all imports at top of file. The dynamic import had no meaningful performance benefit — AGUI parser is ~4KB in a 2.1MB CLI.
1 parent 9ffd847 commit a8b3948

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/cli/operations/dev/invoke.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { invokeA2AStreaming } from './invoke-a2a';
2+
import { invokeAguiStreaming } from './invoke-agui';
23
import { ConnectionError, type InvokeStreamingOptions, type SSELogger, ServerError } from './invoke-types';
34
import { isConnectionError, sleep } from './utils';
45

@@ -224,11 +225,9 @@ export async function* invokeForProtocol(
224225
case 'A2A':
225226
yield* invokeA2AStreaming(options);
226227
break;
227-
case 'AGUI': {
228-
const { invokeAguiStreaming } = await import('./invoke-agui');
228+
case 'AGUI':
229229
yield* invokeAguiStreaming(options);
230230
break;
231-
}
232231
default:
233232
yield* invokeAgentStreaming(options);
234233
}

0 commit comments

Comments
 (0)