MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / handleOpenRuleFile

Function handleOpenRuleFile

src/core/webview/rulesMessageHandler.ts:84–98  ·  view source on GitHub ↗
(provider: ClineProvider, cwd: string, message: WebviewMessage)

Source from the content-addressed store, hash-verified

82}
83
84export async function handleOpenRuleFile(provider: ClineProvider, cwd: string, message: WebviewMessage): Promise<void> {
85 try {
86 const input = parseDeleteRuleInput(message)
87 const filePath = await resolveRuleFile(cwd, input)
88 if (!filePath) {
89 throw new Error("Rule file not found")
90 }
91
92 openFile(filePath)
93 } catch (error) {
94 const errorMessage = getErrorMessage(error)
95 provider.log(`Error opening rule file: ${errorMessage}`)
96 vscode.window.showErrorMessage(`Failed to open rule file: ${errorMessage}`)
97 }
98}
99
100export async function handleOpenRulesDirectory(
101 provider: ClineProvider,

Callers 2

webviewMessageHandlerFunction · 0.90

Calls 6

resolveRuleFileFunction · 0.90
openFileFunction · 0.90
parseDeleteRuleInputFunction · 0.85
getErrorMessageFunction · 0.70
logMethod · 0.65
showErrorMessageMethod · 0.45

Tested by

no test coverage detected