feat(FN-1433): wire prompt overrides into mission interview service

- Import resolvePrompt and PromptOverrideMap from @fusion/core
- Add promptOverrides parameter to all agent creation paths:
  - createMissionInterviewSession
  - submitMissionInterviewResponse
  - retryMissionInterviewSession
  - initializeAgent
  - createMissionInterviewAgent
  - ensureMissionInterviewAgent
- Use resolvePrompt('planning-system', promptOverrides) for effective prompt
- Fall back to MISSION_INTERVIEW_SYSTEM_PROMPT when override absent
- Update module docs to reflect prompt override behavior
This commit is contained in:
gsxdsm
2026-04-11 08:52:39 -07:00
parent e48e034754
commit b40c9b5406
4 changed files with 110 additions and 54 deletions

View File

@@ -53,7 +53,7 @@ describe("useTaskDiffStats", () => {
expect(mockFetchTaskDiff).toHaveBeenCalledWith("FN-123", undefined, "proj-1");
});
it("does not fetch for non-done columns", async () => {
it("does not fetch for active columns without a worktree", async () => {
const { result: inProgress } = renderHook(() =>
useTaskDiffStats("FN-123", "in-progress", "abc1234", undefined),
);
@@ -74,6 +74,30 @@ describe("useTaskDiffStats", () => {
expect(mockFetchTaskDiff).not.toHaveBeenCalled();
});
it("fetches diff stats for active tasks with a worktree", async () => {
mockFetchTaskDiff.mockResolvedValueOnce({
files: [
{ path: "src/a.ts", status: "modified", additions: 10, deletions: 2, patch: "" },
],
stats: { filesChanged: 1, additions: 10, deletions: 2 },
});
const { result } = renderHook(() =>
useTaskDiffStats(
"FN-123",
"in-progress",
undefined,
"proj-1",
{ worktree: "/repo/.worktrees/fn-123" },
),
);
await waitFor(() => expect(result.current.loading).toBe(false));
expect(result.current.stats).toEqual({ filesChanged: 1, additions: 10, deletions: 2 });
expect(mockFetchTaskDiff).toHaveBeenCalledWith("FN-123", "/repo/.worktrees/fn-123", "proj-1");
});
it("does not fetch for done tasks without a commit SHA", async () => {
const { result } = renderHook(() =>
useTaskDiffStats("FN-123", "done", undefined, undefined),