mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: add missing TypeScript type definitions for diagnostic settings
- Add diagnosticsDelayMs and diagnosticsEnabled to globalSettingsSchema - Include properties in ExtensionState Pick type - Add default values to EVALS_SETTINGS - Fix VSCode mock to include DiagnosticSeverity for tests - Resolves compilation errors in ClineProvider and webviewMessageHandler
This commit is contained in:
parent
87e7b3eba2
commit
a1e7983ff2
4 changed files with 7653 additions and 3 deletions
7638
package-lock.json
generated
Normal file
7638
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -86,6 +86,9 @@ export const globalSettingsSchema = z.object({
|
|||
terminalZdotdir: z.boolean().optional(),
|
||||
terminalCompressProgressBar: z.boolean().optional(),
|
||||
|
||||
diagnosticsDelayMs: z.number().optional(),
|
||||
diagnosticsEnabled: z.boolean().optional(),
|
||||
|
||||
rateLimitSeconds: z.number().optional(),
|
||||
diffEnabled: z.boolean().optional(),
|
||||
fuzzyMatchThreshold: z.number().optional(),
|
||||
|
|
@ -224,6 +227,9 @@ export const EVALS_SETTINGS: RooCodeSettings = {
|
|||
terminalCompressProgressBar: true,
|
||||
terminalShellIntegrationDisabled: true,
|
||||
|
||||
diagnosticsDelayMs: 2000,
|
||||
diagnosticsEnabled: true,
|
||||
|
||||
diffEnabled: true,
|
||||
fuzzyMatchThreshold: 1,
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ vi.mock("vscode", () => ({
|
|||
languages: {
|
||||
getDiagnostics: vi.fn(() => []),
|
||||
},
|
||||
DiagnosticSeverity: {
|
||||
Error: 0,
|
||||
Warning: 1,
|
||||
Information: 2,
|
||||
Hint: 3,
|
||||
},
|
||||
WorkspaceEdit: vi.fn().mockImplementation(() => ({
|
||||
replace: vi.fn(),
|
||||
delete: vi.fn(),
|
||||
|
|
@ -347,7 +353,7 @@ describe("DiffViewProvider", () => {
|
|||
},
|
||||
}
|
||||
;(diffViewProvider as any).preDiagnostics = []
|
||||
|
||||
|
||||
// Mock vscode functions
|
||||
vi.mocked(vscode.window.showTextDocument).mockResolvedValue({} as any)
|
||||
vi.mocked(vscode.languages.getDiagnostics).mockReturnValue([])
|
||||
|
|
|
|||
|
|
@ -214,6 +214,8 @@ export type ExtensionState = Pick<
|
|||
| "terminalZshP10k"
|
||||
| "terminalZdotdir"
|
||||
| "terminalCompressProgressBar"
|
||||
| "diagnosticsDelayMs"
|
||||
| "diagnosticsEnabled"
|
||||
| "diffEnabled"
|
||||
| "fuzzyMatchThreshold"
|
||||
// | "experiments" // Optional in GlobalSettings, required here.
|
||||
|
|
@ -243,8 +245,6 @@ export type ExtensionState = Pick<
|
|||
taskHistory: HistoryItem[]
|
||||
|
||||
writeDelayMs: number
|
||||
diagnosticsDelayMs: number
|
||||
diagnosticsEnabled: boolean
|
||||
requestDelaySeconds: number
|
||||
|
||||
enableCheckpoints: boolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue