feat(FN-4486): complete Step 2 — type roadmap suggestions option bag

Fusion-Task-Id: FN-4486
Fusion-Task-Lineage: 7d3b40b2-883f-450c-96ec-796f8af4fa45
This commit is contained in:
Fusion
2026-05-14 10:03:25 -07:00
committed by gsxdsm
parent ee7993e2b2
commit 2cff885d9f

View File

@@ -1,6 +1,6 @@
import type { CreateAiSessionFactory } from "@fusion/core"; import type { CreateAiSessionFactory } from "@fusion/core";
type LegacyCreateFnAgent = (options: { interface RoadmapSuggestionRequestOptions {
cwd: string; cwd: string;
systemPrompt: string; systemPrompt: string;
tools?: "coding" | "readonly"; tools?: "coding" | "readonly";
@@ -8,7 +8,9 @@ type LegacyCreateFnAgent = (options: {
defaultModelId?: string; defaultModelId?: string;
onThinking?: () => void; onThinking?: () => void;
onText?: () => void; onText?: () => void;
}) => Promise<{ }
type LegacyCreateFnAgent = (options: RoadmapSuggestionRequestOptions) => Promise<{
session: { session: {
prompt(text: string): Promise<void>; prompt(text: string): Promise<void>;
state: { messages: Array<{ role: string; content?: string | Array<{ type: string; text: string }> }> }; state: { messages: Array<{ role: string; content?: string | Array<{ type: string; text: string }> }> };
@@ -373,7 +375,7 @@ export function __setCreateFnAgent(mock: LegacyCreateFnAgent | undefined): void
injectedCreateAiSession = undefined; injectedCreateAiSession = undefined;
return; return;
} }
injectedCreateAiSession = async (options) => mock(options); injectedCreateAiSession = async (options: RoadmapSuggestionRequestOptions) => mock(options);
} }
export function __setCreateAiSessionFactory(mock: CreateAiSessionFactory | undefined): void { export function __setCreateAiSessionFactory(mock: CreateAiSessionFactory | undefined): void {