Skip to content

Commit 9a7666c

Browse files
committed
Remove customizable path, only use downloaded semble
1 parent 43c8153 commit 9a7666c

13 files changed

Lines changed: 20 additions & 85 deletions

File tree

packages/types/src/codebase-index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ export const codebaseIndexConfigSchema = z.object({
5151
codebaseIndexBedrockProfile: z.string().optional(),
5252
// OpenRouter specific fields
5353
codebaseIndexOpenRouterSpecificProvider: z.string().optional(),
54-
// Semble specific fields
55-
codebaseIndexSemblePath: z.string().optional(),
5654
})
5755

5856
export type CodebaseIndexConfig = z.infer<typeof codebaseIndexConfigSchema>

packages/types/src/vscode-extension-host.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ export interface WebviewMessage {
677677
codebaseIndexSearchMaxResults?: number
678678
codebaseIndexSearchMinScore?: number
679679
codebaseIndexOpenRouterSpecificProvider?: string // OpenRouter provider routing
680-
codebaseIndexSemblePath?: string // Path to the semble executable
681680

682681
// Secret settings
683682
codeIndexOpenAiKey?: string

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,6 @@ export class ClineProvider
22532253
codebaseIndexBedrockRegion: codebaseIndexConfig?.codebaseIndexBedrockRegion,
22542254
codebaseIndexBedrockProfile: codebaseIndexConfig?.codebaseIndexBedrockProfile,
22552255
codebaseIndexOpenRouterSpecificProvider: codebaseIndexConfig?.codebaseIndexOpenRouterSpecificProvider,
2256-
codebaseIndexSemblePath: codebaseIndexConfig?.codebaseIndexSemblePath,
22572256
},
22582257
// Phase 1 cloud removal: do not let Cloud-auth MDM enforcement force login-only UI flows.
22592258
mdmCompliant: undefined,
@@ -2458,7 +2457,6 @@ export class ClineProvider
24582457
codebaseIndexBedrockProfile: stateValues.codebaseIndexConfig?.codebaseIndexBedrockProfile,
24592458
codebaseIndexOpenRouterSpecificProvider:
24602459
stateValues.codebaseIndexConfig?.codebaseIndexOpenRouterSpecificProvider,
2461-
codebaseIndexSemblePath: stateValues.codebaseIndexConfig?.codebaseIndexSemblePath,
24622460
},
24632461
profileThresholds: stateValues.profileThresholds ?? {},
24642462
lockApiConfigAcrossModes: this.context.workspaceState.get("lockApiConfigAcrossModes", false),

src/core/webview/webviewMessageHandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,6 @@ export const webviewMessageHandler = async (
25002500
codebaseIndexSearchMaxResults: settings.codebaseIndexSearchMaxResults,
25012501
codebaseIndexSearchMinScore: settings.codebaseIndexSearchMinScore,
25022502
codebaseIndexOpenRouterSpecificProvider: settings.codebaseIndexOpenRouterSpecificProvider,
2503-
codebaseIndexSemblePath: settings.codebaseIndexSemblePath,
25042503
}
25052504

25062505
// Save global state first

src/services/code-index/config-manager.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export class CodeIndexConfigManager {
2222
private vercelAiGatewayOptions?: { apiKey: string }
2323
private bedrockOptions?: { region: string; profile?: string }
2424
private openRouterOptions?: { apiKey: string; specificProvider?: string }
25-
private semblePath?: string
2625
private qdrantUrl?: string = "http://localhost:6333"
2726
private qdrantApiKey?: string
2827
private searchMinScore?: number
@@ -151,9 +150,6 @@ export class CodeIndexConfigManager {
151150
this.bedrockOptions = bedrockRegion
152151
? { region: bedrockRegion, profile: bedrockProfile || undefined }
153152
: undefined
154-
155-
// Semble path (optional — defaults to "semble" in the SembleProvider)
156-
this.semblePath = codebaseIndexConfig.codebaseIndexSemblePath || undefined
157153
}
158154

159155
/**
@@ -200,7 +196,6 @@ export class CodeIndexConfigManager {
200196
openRouterSpecificProvider: this.openRouterOptions?.specificProvider ?? "",
201197
qdrantUrl: this.qdrantUrl ?? "",
202198
qdrantApiKey: this.qdrantApiKey ?? "",
203-
semblePath: this.semblePath ?? "",
204199
}
205200

206201
// Refresh secrets from VSCode storage to ensure we have the latest values
@@ -417,13 +412,6 @@ export class CodeIndexConfigManager {
417412
return true
418413
}
419414

420-
// Semble path change requires restart to use the new executable
421-
const prevSemblePath = prev?.semblePath ?? ""
422-
const currentSemblePath = this.semblePath ?? ""
423-
if (prevSemblePath !== currentSemblePath) {
424-
return true
425-
}
426-
427415
// Vector dimension changes (still important for compatibility)
428416
if (this._hasVectorDimensionChanged(prevProvider, prev?.modelId)) {
429417
return true
@@ -560,12 +548,4 @@ export class CodeIndexConfigManager {
560548
public get currentSearchMaxResults(): number {
561549
return this.searchMaxResults ?? DEFAULT_MAX_SEARCH_RESULTS
562550
}
563-
564-
/**
565-
* Gets the configured path to the semble executable.
566-
* Returns undefined if not explicitly configured (provider will use default "semble").
567-
*/
568-
public get currentSemblePath(): string | undefined {
569-
return this.semblePath
570-
}
571551
}

src/services/code-index/interfaces/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ export type PreviousConfigSnapshot = {
4545
openRouterSpecificProvider?: string
4646
qdrantUrl?: string
4747
qdrantApiKey?: string
48-
semblePath?: string
4948
}

src/services/code-index/manager.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,7 @@ export class CodeIndexManager {
404404

405405
// Branch: if provider is "semble", create SembleProvider instead of external services
406406
if (this._configManager!.currentEmbedderProvider === "semble") {
407-
this._sembleProvider = new SembleProvider(
408-
this.workspacePath,
409-
this.context,
410-
this._stateManager,
411-
this._configManager!.currentSemblePath,
412-
)
407+
this._sembleProvider = new SembleProvider(this.workspacePath, this.context, this._stateManager)
413408
await this._sembleProvider.initialize()
414409
return
415410
}

src/services/code-index/semble/__tests__/provider.spec.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe("SembleProvider", () => {
5757
globalStorageUri: { fsPath: "/mock/storage" },
5858
}
5959

60-
provider = new SembleProvider("/workspace", mockContext, mockStateManager, "semble")
60+
provider = new SembleProvider("/workspace", mockContext, mockStateManager)
6161
mockCli = sharedMockCli
6262
})
6363

@@ -68,13 +68,8 @@ describe("SembleProvider", () => {
6868
expect(p.state).toBe("Standby")
6969
})
7070

71-
it("should create provider with custom semble path", () => {
72-
const p = new SembleProvider("/workspace", mockContext, mockStateManager, "/usr/local/bin/semble")
73-
expect(p).toBeDefined()
74-
})
75-
7671
it("should create provider with custom topK and content", () => {
77-
const p = new SembleProvider("/workspace", mockContext, mockStateManager, "semble", {
72+
const p = new SembleProvider("/workspace", mockContext, mockStateManager, {
7873
topK: 5,
7974
content: "all",
8075
})
@@ -143,16 +138,6 @@ describe("SembleProvider", () => {
143138

144139
expect(mockCli.checkInstalled).toHaveBeenCalledTimes(1)
145140
})
146-
147-
it("should skip download when custom semble path is configured", async () => {
148-
const customProvider = new SembleProvider("/workspace", mockContext, mockStateManager, "/custom/semble")
149-
mockCli.checkInstalled.mockResolvedValue({ installed: true })
150-
151-
await customProvider.initialize()
152-
153-
expect(downloadSemble).not.toHaveBeenCalled()
154-
expect(customProvider.state).toBe("Indexed")
155-
})
156141
})
157142

158143
describe("startIndexing", () => {

src/services/code-index/semble/__tests__/semble-cli.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ describe("SembleCLI", () => {
5151
})
5252

5353
describe("constructor", () => {
54-
it("should use default semble path", () => {
55-
const defaultCli = new SembleCLI()
56-
expect(defaultCli).toBeDefined()
57-
})
58-
59-
it("should accept a custom path to the semble executable", () => {
54+
it("should accept a path to the semble executable", () => {
6055
const customCli = new SembleCLI("/usr/local/bin/semble")
6156
expect(customCli).toBeDefined()
6257
})

src/services/code-index/semble/provider.ts

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { TelemetryEventName } from "@roo-code/types"
2121
* to this provider instead of the ServiceFactory → orchestrator pipeline.
2222
*/
2323
export class SembleProvider implements ISembleProvider {
24-
private cli: SembleCLI
24+
private cli!: SembleCLI
2525
private readonly workspacePath: string
2626
private readonly config: SembleConfig
2727
private readonly stateManager: CodeIndexStateManager
@@ -34,28 +34,24 @@ export class SembleProvider implements ISembleProvider {
3434
workspacePath: string,
3535
context: vscode.ExtensionContext,
3636
stateManager: CodeIndexStateManager,
37-
semblePath: string = SEMBLE_DEFAULTS.DEFAULT_PATH,
3837
options?: { topK?: number; content?: SembleContentType },
3938
) {
4039
this.workspacePath = workspacePath
4140
this.context = context
4241
this.stateManager = stateManager
4342

4443
this.config = {
45-
semblePath,
4644
topK: options?.topK ?? SEMBLE_DEFAULTS.DEFAULT_TOP_K,
4745
content: options?.content ?? SEMBLE_DEFAULTS.DEFAULT_CONTENT,
4846
}
49-
50-
this.cli = new SembleCLI(semblePath)
5147
}
5248

5349
get state(): IndexingState {
5450
return this._state
5551
}
5652

5753
/**
58-
* Initializes the provider: downloads semble if needed, then validates it works.
54+
* Initializes the provider: downloads semble, then validates it works.
5955
*/
6056
async initialize(): Promise<void> {
6157
if (this._isInitialized) {
@@ -73,21 +69,20 @@ export class SembleProvider implements ISembleProvider {
7369
return
7470
}
7571

76-
// Auto-download semble if no custom path is configured
77-
if (this.config.semblePath === SEMBLE_DEFAULTS.DEFAULT_PATH) {
78-
try {
79-
this.stateManager.setSystemState("Indexing", "Downloading semble binary...")
80-
const storageDir = this.context.globalStorageUri.fsPath
81-
const binaryPath = await downloadSemble(storageDir)
82-
if (binaryPath) {
83-
this.cli = new SembleCLI(binaryPath)
84-
}
85-
} catch (error: any) {
86-
this._state = "Error"
87-
this.stateManager.setSystemState("Error", `Failed to download semble: ${error?.message || error}`)
88-
console.error("[SembleProvider] Download failed:", error?.message || error)
89-
return
72+
// Download semble binary
73+
try {
74+
this.stateManager.setSystemState("Indexing", "Downloading semble binary...")
75+
const storageDir = this.context.globalStorageUri.fsPath
76+
const binaryPath = await downloadSemble(storageDir)
77+
if (!binaryPath) {
78+
throw new Error("Download returned no path")
9079
}
80+
this.cli = new SembleCLI(binaryPath)
81+
} catch (error: any) {
82+
this._state = "Error"
83+
this.stateManager.setSystemState("Error", `Failed to download semble: ${error?.message || error}`)
84+
console.error("[SembleProvider] Download failed:", error?.message || error)
85+
return
9186
}
9287

9388
// Verify the binary works

0 commit comments

Comments
 (0)