Skip to content

Commit 9220b8d

Browse files
committed
feat(e2e): adding api to make e2e easier and some local vscode easier
1 parent ef144e8 commit 9220b8d

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
},
1111
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
1212
"typescript.tsc.autoDetect": "off",
13+
// Use the workspace TypeScript version so editor diagnostics match `pnpm check-types`
14+
"typescript.tsdk": "node_modules/typescript/lib",
1315
"vitest.disableWorkspaceWarning": true
1416
}

packages/types/src/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ export interface RooCodeAPI extends EventEmitter<RooCodeAPIEvents> {
139139
* @throws Error if the profile does not exist
140140
*/
141141
setActiveProfile(name: string): Promise<string | undefined>
142+
/**
143+
* Returns the extension's global storage path (context.globalStorageUri.fsPath).
144+
* Useful for tests that need to verify files written to or read from extension storage.
145+
*/
146+
get storagePath(): string
142147
}
143148

144149
export interface RooCodeIpcServer extends EventEmitter<IpcServerEvents> {

src/extension/api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,4 +561,8 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
561561
await this.sidebarProvider.activateProviderProfile({ name })
562562
return this.getActiveProfile()
563563
}
564+
565+
public get storagePath(): string {
566+
return this.context.globalStorageUri.fsPath
567+
}
564568
}

0 commit comments

Comments
 (0)