mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Refactor ClineProvider
This commit is contained in:
@@ -41,7 +41,7 @@ import { parseAssistantMessage } from "./prompts/parse-assistant-message"
|
|||||||
import { formatResponse } from "./prompts/responses"
|
import { formatResponse } from "./prompts/responses"
|
||||||
import { addCustomInstructions, SYSTEM_PROMPT } from "./prompts/system"
|
import { addCustomInstructions, SYSTEM_PROMPT } from "./prompts/system"
|
||||||
import { truncateHalfConversation } from "./sliding-window"
|
import { truncateHalfConversation } from "./sliding-window"
|
||||||
import { ClineProvider, GlobalFileNames } from "./webview/ClaudeDevProvider"
|
import { ClineProvider, GlobalFileNames } from "./webview/ClineProvider"
|
||||||
|
|
||||||
const cwd =
|
const cwd =
|
||||||
vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution
|
vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as vscode from "vscode"
|
import * as vscode from "vscode"
|
||||||
import { ClineProvider } from "../core/webview/ClaudeDevProvider"
|
import { ClineProvider } from "../core/webview/ClineProvider"
|
||||||
import { ClaudeDevAPI } from "./claude-dev"
|
import { ClaudeDevAPI } from "./claude-dev"
|
||||||
|
|
||||||
export function createClaudeDevAPI(outputChannel: vscode.OutputChannel, sidebarProvider: ClineProvider): ClaudeDevAPI {
|
export function createClaudeDevAPI(outputChannel: vscode.OutputChannel, sidebarProvider: ClineProvider): ClaudeDevAPI {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// The module 'vscode' contains the VS Code extensibility API
|
// The module 'vscode' contains the VS Code extensibility API
|
||||||
// Import the module and reference it with the alias vscode in your code below
|
// Import the module and reference it with the alias vscode in your code below
|
||||||
import * as vscode from "vscode"
|
|
||||||
import { ClineProvider } from "./core/webview/ClaudeDevProvider"
|
|
||||||
import delay from "delay"
|
import delay from "delay"
|
||||||
|
import * as vscode from "vscode"
|
||||||
|
import { ClineProvider } from "./core/webview/ClineProvider"
|
||||||
import { createClaudeDevAPI } from "./exports"
|
import { createClaudeDevAPI } from "./exports"
|
||||||
import "./utils/path" // necessary to have access to String.prototype.toPosix
|
import "./utils/path" // necessary to have access to String.prototype.toPosix
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as vscode from "vscode"
|
import * as vscode from "vscode"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import { listFiles } from "../../services/glob/list-files"
|
import { listFiles } from "../../services/glob/list-files"
|
||||||
import { ClineProvider } from "../../core/webview/ClaudeDevProvider"
|
import { ClineProvider } from "../../core/webview/ClineProvider"
|
||||||
|
|
||||||
const cwd = vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0)
|
const cwd = vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user