Skip to content

Commit b73021c

Browse files
committed
refactor: move hook system files to src/hooks/ to match submission requirements
- Move HookEngine.ts from src/core/hooks/ to src/hooks/ - Move OrchestrationDataModel.ts from src/core/orchestration/ to src/hooks/ - Move SelectActiveIntentTool.ts from src/core/tools/ to src/hooks/ - Update all import paths in presentAssistantMessage.ts and test files - Consolidate all hook-related files in clean src/hooks/ directory as required
1 parent b0bb6c7 commit b73021c

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ import { generateImageTool } from "../tools/GenerateImageTool"
3737
import { applyDiffTool as applyDiffToolClass } from "../tools/ApplyDiffTool"
3838
import { isValidToolName, validateToolUse } from "../tools/validateToolUse"
3939
import { codebaseSearchTool } from "../tools/CodebaseSearchTool"
40-
import { selectActiveIntentTool } from "../tools/SelectActiveIntentTool"
41-
4240
import { formatResponse } from "../prompts/responses"
4341
import { sanitizeToolUseId } from "../../utils/tool-id"
44-
import { HookEngine } from "../hooks/HookEngine"
42+
import { HookEngine } from "../../hooks/HookEngine"
43+
import { selectActiveIntentTool } from "../../hooks/SelectActiveIntentTool"
4544

4645
/**
4746
* Processes and presents assistant message content to the user interface.

src/core/tools/__tests__/selectActiveIntentTool.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import * as fs from "fs/promises"
44
import * as path from "path"
55
import * as os from "os"
66

7-
import { selectActiveIntentTool } from "../SelectActiveIntentTool"
7+
import { selectActiveIntentTool } from "../../../hooks/SelectActiveIntentTool"
88
import type { ToolUse } from "../../../shared/tools"
9-
import type { AgentTraceEntry } from "../../orchestration/OrchestrationDataModel"
9+
import type { AgentTraceEntry } from "../../../hooks/OrchestrationDataModel"
1010

1111
describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
1212
let testWorkspaceDir: string
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Task } from "../task/Task"
2-
import type { ToolUse } from "../../shared/tools"
1+
import { Task } from "../core/task/Task"
2+
import type { ToolUse } from "../shared/tools"
33
import type { ToolName } from "@roo-code/types"
4-
import { OrchestrationDataModel, type ActiveIntent } from "../orchestration/OrchestrationDataModel"
4+
import { OrchestrationDataModel, type ActiveIntent } from "./OrchestrationDataModel"
55
import * as vscode from "vscode"
66
import * as path from "path"
77
import * as fs from "fs/promises"
@@ -339,3 +339,4 @@ export class HookEngine {
339339
}
340340
}
341341
}
342+

src/core/orchestration/OrchestrationDataModel.ts renamed to src/hooks/OrchestrationDataModel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,4 @@ This file contains persistent knowledge shared across parallel sessions (Archite
257257
return this.orchestrationDir
258258
}
259259
}
260+
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Task } from "../task/Task"
2-
import { formatResponse } from "../prompts/responses"
3-
import { BaseTool, ToolCallbacks } from "./BaseTool"
4-
import type { ToolUse } from "../../shared/tools"
5-
import { OrchestrationDataModel } from "../orchestration/OrchestrationDataModel"
1+
import { Task } from "../core/task/Task"
2+
import { formatResponse } from "../core/prompts/responses"
3+
import { BaseTool, ToolCallbacks } from "../core/tools/BaseTool"
4+
import type { ToolUse } from "../shared/tools"
5+
import { OrchestrationDataModel } from "./OrchestrationDataModel"
66

77
interface SelectActiveIntentParams {
88
intent_id: string
@@ -126,3 +126,4 @@ ${recentHistorySection}
126126
}
127127

128128
export const selectActiveIntentTool = new SelectActiveIntentTool()
129+

0 commit comments

Comments
 (0)