(provider: ClineProvider, cwd: string, message: WebviewMessage)
| 82 | } |
| 83 | |
| 84 | export 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 | |
| 100 | export async function handleOpenRulesDirectory( |
| 101 | provider: ClineProvider, |
no test coverage detected