Skip to content

Commit 1d79ad0

Browse files
committed
Merge main
2 parents 11c74f2 + 61e122d commit 1d79ad0

File tree

132 files changed

+8187
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+8187
-191
lines changed

.changeset/ready-guests-hide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Convert bootstrap script to esm

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,18 @@ body:
7171
- type: textarea
7272
id: what-happened
7373
attributes:
74-
label: 💥 Outcome Summary (Optional)
74+
label: 💥 Outcome Summary
7575
description: |
76-
Recap what went wrong in one or two lines. Use this if the bug is weird, unexpected, or needs extra context.
76+
Recap what went wrong in one or two lines.
7777
7878
Example: "Expected code to run, but got an empty response and no error."
7979
placeholder: Expected ___, but got ___.
80+
validations:
81+
required: true
8082

8183
- type: textarea
8284
id: logs
8385
attributes:
84-
label: 📄 Relevant Logs or Errors
86+
label: 📄 Relevant Logs or Errors (Optional)
8587
description: Paste API logs, terminal output, or errors here. Use triple backticks (```) for code formatting.
8688
render: shell

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Detail the steps to test your changes. This helps reviewers verify your work.
6161
- [ ] **Branch Hygiene**: My branch is up-to-date (rebased) with the `main` branch.
6262
- [ ] **Documentation Impact**: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
6363
- [ ] **Changeset**: A changeset has been created using `npm run changeset` if this PR includes user-facing changes or dependency updates.
64-
- [ ] **Contribution Guidelines**: I have read and agree to the [Contributor Guidelines](../CONTRIBUTING.md).
64+
- [ ] **Contribution Guidelines**: I have read and agree to the [Contributor Guidelines](/CONTRIBUTING.md).
6565

6666
### Screenshots / Videos
6767

.husky/pre-commit

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ fi
99
if [ "$OS" = "Windows_NT" ]; then
1010
pnpm_cmd="pnpm.cmd"
1111
else
12-
pnpm_cmd="pnpm"
12+
if command -v pnpm >/dev/null 2>&1; then
13+
pnpm_cmd="pnpm"
14+
else
15+
pnpm_cmd="npx pnpm"
16+
fi
1317
fi
1418

1519
# Detect if running on Windows and use npx.cmd, otherwise use npx.
@@ -19,5 +23,5 @@ else
1923
npx_cmd="npx"
2024
fi
2125

22-
"$npx_cmd" lint-staged
23-
"$pnpm_cmd" lint
26+
$npx_cmd lint-staged
27+
$pnpm_cmd lint

.husky/pre-push

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ fi
99
if [ "$OS" = "Windows_NT" ]; then
1010
pnpm_cmd="pnpm.cmd"
1111
else
12-
pnpm_cmd="pnpm"
12+
if command -v pnpm >/dev/null 2>&1; then
13+
pnpm_cmd="pnpm"
14+
else
15+
pnpm_cmd="npx pnpm"
16+
fi
1317
fi
1418

15-
"$pnpm_cmd" run check-types
19+
$pnpm_cmd run check-types
1620

1721
# Check for new changesets.
1822
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
"node": "20.18.1"
66
},
77
"scripts": {
8-
"preinstall": "npx only-allow pnpm",
8+
"preinstall": "node scripts/bootstrap.mjs",
99
"prepare": "husky",
10+
"install": "node scripts/bootstrap.mjs",
11+
"install:all": "node scripts/bootstrap.mjs",
1012
"lint": "turbo lint --log-order grouped --output-logs new-only",
1113
"check-types": "turbo check-types --log-order grouped --output-logs new-only",
1214
"test": "turbo test --log-order grouped --output-logs new-only",

packages/types/src/types.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,31 @@ export const modelInfoSchema = z.object({
209209

210210
export type ModelInfo = z.infer<typeof modelInfoSchema>
211211

212+
/**
213+
* Codebase Index Config
214+
*/
215+
export const codebaseIndexConfigSchema = z.object({
216+
codebaseIndexEnabled: z.boolean().optional(),
217+
codebaseIndexQdrantUrl: z.string().optional(),
218+
codebaseIndexEmbedderProvider: z.enum(["openai", "ollama"]).optional(),
219+
codebaseIndexEmbedderBaseUrl: z.string().optional(),
220+
codebaseIndexEmbedderModelId: z.string().optional(),
221+
})
222+
223+
export type CodebaseIndexConfig = z.infer<typeof codebaseIndexConfigSchema>
224+
225+
export const codebaseIndexModelsSchema = z.object({
226+
openai: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
227+
ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
228+
})
229+
230+
export type CodebaseIndexModels = z.infer<typeof codebaseIndexModelsSchema>
231+
232+
export const codebaseIndexProviderSchema = z.object({
233+
codeIndexOpenAiKey: z.string().optional(),
234+
codeIndexQdrantApiKey: z.string().optional(),
235+
})
236+
212237
/**
213238
* HistoryItem
214239
*/
@@ -622,6 +647,7 @@ export const providerSettingsSchema = z.object({
622647
...groqSchema.shape,
623648
...chutesSchema.shape,
624649
...litellmSchema.shape,
650+
...codebaseIndexProviderSchema.shape,
625651
})
626652

627653
export type ProviderSettings = z.infer<typeof providerSettingsSchema>
@@ -698,6 +724,9 @@ const providerSettingsRecord: ProviderSettingsRecord = {
698724
// Requesty
699725
requestyApiKey: undefined,
700726
requestyModelId: undefined,
727+
// Code Index
728+
codeIndexOpenAiKey: undefined,
729+
codeIndexQdrantApiKey: undefined,
701730
// Reasoning
702731
enableReasoningEffort: undefined,
703732
reasoningEffort: undefined,
@@ -744,6 +773,8 @@ export const globalSettingsSchema = z.object({
744773
autoApprovalEnabled: z.boolean().optional(),
745774
alwaysAllowReadOnly: z.boolean().optional(),
746775
alwaysAllowReadOnlyOutsideWorkspace: z.boolean().optional(),
776+
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
777+
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
747778
alwaysAllowWrite: z.boolean().optional(),
748779
alwaysAllowWriteOutsideWorkspace: z.boolean().optional(),
749780
writeDelayMs: z.number().optional(),
@@ -814,6 +845,8 @@ export type GlobalSettings = z.infer<typeof globalSettingsSchema>
814845
type GlobalSettingsRecord = Record<Keys<GlobalSettings>, undefined>
815846

816847
const globalSettingsRecord: GlobalSettingsRecord = {
848+
codebaseIndexModels: undefined,
849+
codebaseIndexConfig: undefined,
817850
currentApiConfigName: undefined,
818851
listApiConfigMeta: undefined,
819852
pinnedApiConfigs: undefined,
@@ -926,8 +959,12 @@ export type SecretState = Pick<
926959
| "groqApiKey"
927960
| "chutesApiKey"
928961
| "litellmApiKey"
962+
| "codeIndexOpenAiKey"
963+
| "codeIndexQdrantApiKey"
929964
>
930965

966+
export type CodeIndexSecrets = "codeIndexOpenAiKey" | "codeIndexQdrantApiKey"
967+
931968
type SecretStateRecord = Record<Keys<SecretState>, undefined>
932969

933970
const secretStateRecord: SecretStateRecord = {
@@ -948,6 +985,8 @@ const secretStateRecord: SecretStateRecord = {
948985
groqApiKey: undefined,
949986
chutesApiKey: undefined,
950987
litellmApiKey: undefined,
988+
codeIndexOpenAiKey: undefined,
989+
codeIndexQdrantApiKey: undefined,
951990
}
952991

953992
export const SECRET_STATE_KEYS = Object.keys(secretStateRecord) as Keys<SecretState>[]
@@ -1016,6 +1055,7 @@ export const clineSays = [
10161055
"rooignore_error",
10171056
"diff_error",
10181057
"condense_context",
1058+
"codebase_search_result",
10191059
] as const
10201060

10211061
export const clineSaySchema = z.enum(clineSays)
@@ -1104,6 +1144,7 @@ export const toolNames = [
11041144
"switch_mode",
11051145
"new_task",
11061146
"fetch_instructions",
1147+
"codebase_search",
11071148
] as const
11081149

11091150
export const toolNamesSchema = z.enum(toolNames)

0 commit comments

Comments
 (0)