Skip to content

Commit b6e8961

Browse files
committed
Merge branch 'main' into msukkarieh/ask_context
2 parents 9bb7865 + e404838 commit b6e8961

24 files changed

+981
-855
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- Add search context to ask sourcebot context selector. [#397](https://github.com/sourcebot-dev/sourcebot/pull/397)
12+
13+
## [4.6.0] - 2025-07-25
14+
1015
### Added
1116
- Introducing Ask Sourcebot - ask natural langauge about your codebase. Get back comprehensive Markdown responses with inline citations back to the code. Bring your own LLM api key. [#392](https://github.com/sourcebot-dev/sourcebot/pull/392)
1217

packages/web/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
"stripe:listen": "stripe listen --forward-to http://localhost:3000/api/stripe"
1313
},
1414
"dependencies": {
15-
"@ai-sdk/amazon-bedrock": "3.0.0-beta.9",
16-
"@ai-sdk/anthropic": "2.0.0-beta.8",
17-
"@ai-sdk/azure": "2.0.0-beta.11",
18-
"@ai-sdk/deepseek": "1.0.0-beta.8",
19-
"@ai-sdk/google": "2.0.0-beta.14",
20-
"@ai-sdk/google-vertex": "3.0.0-beta.16",
21-
"@ai-sdk/mistral": "2.0.0-beta.6",
22-
"@ai-sdk/openai": "2.0.0-beta.11",
23-
"@ai-sdk/react": "2.0.0-beta.26",
24-
"@ai-sdk/xai": "2.0.0-beta.10",
15+
"@ai-sdk/amazon-bedrock": "3.0.0-beta.10",
16+
"@ai-sdk/anthropic": "2.0.0-beta.9",
17+
"@ai-sdk/azure": "2.0.0-beta.12",
18+
"@ai-sdk/deepseek": "1.0.0-beta.9",
19+
"@ai-sdk/google": "2.0.0-beta.15",
20+
"@ai-sdk/google-vertex": "3.0.0-beta.17",
21+
"@ai-sdk/mistral": "2.0.0-beta.7",
22+
"@ai-sdk/openai": "2.0.0-beta.12",
23+
"@ai-sdk/react": "2.0.0-beta.28",
24+
"@ai-sdk/xai": "2.0.0-beta.11",
2525
"@auth/prisma-adapter": "^2.7.4",
2626
"@codemirror/commands": "^6.6.0",
2727
"@codemirror/lang-cpp": "^6.0.2",
@@ -108,7 +108,7 @@
108108
"@vercel/otel": "^1.13.0",
109109
"@viz-js/lang-dot": "^1.0.4",
110110
"@xiechao/codemirror-lang-handlebars": "^1.0.4",
111-
"ai": "5.0.0-beta.26",
111+
"ai": "5.0.0-beta.28",
112112
"ajv": "^8.17.1",
113113
"bcryptjs": "^3.0.2",
114114
"class-variance-authority": "^0.7.0",

packages/web/src/app/[domain]/browse/[...path]/components/pureCodePreviewPanel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ export const PureCodePreviewPanel = ({
136136
}, [editorRef, highlightRange]);
137137

138138
const onFindReferences = useCallback((symbolName: string) => {
139-
captureEvent('wa_browse_find_references_pressed', {});
139+
captureEvent('wa_find_references_pressed', {
140+
source: 'browse',
141+
});
140142
createAuditAction({
141143
action: "user.performed_find_references",
142144
metadata: {
@@ -160,7 +162,9 @@ export const PureCodePreviewPanel = ({
160162
// If we resolve multiple matches, instead of navigating to the first match, we should
161163
// instead popup the bottom sheet with the list of matches.
162164
const onGotoDefinition = useCallback((symbolName: string, symbolDefinitions: SymbolDefinition[]) => {
163-
captureEvent('wa_browse_goto_definition_pressed', {});
165+
captureEvent('wa_goto_definition_pressed', {
166+
source: 'browse',
167+
});
164168
createAuditAction({
165169
action: "user.performed_goto_definition",
166170
metadata: {

packages/web/src/app/[domain]/search/components/codePreviewPanel/codePreview.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ export const CodePreview = ({
119119
}, [onSelectedMatchIndexChange]);
120120

121121
const onGotoDefinition = useCallback((symbolName: string, symbolDefinitions: SymbolDefinition[]) => {
122-
captureEvent('wa_preview_panel_goto_definition_pressed', {});
122+
captureEvent('wa_goto_definition_pressed', {
123+
source: 'preview',
124+
});
123125
createAuditAction({
124126
action: "user.performed_goto_definition",
125127
metadata: {
@@ -163,7 +165,9 @@ export const CodePreview = ({
163165
}, [captureEvent, file.filepath, file.language, file.revision, navigateToPath, repoName, domain]);
164166

165167
const onFindReferences = useCallback((symbolName: string) => {
166-
captureEvent('wa_preview_panel_find_references_pressed', {});
168+
captureEvent('wa_find_references_pressed', {
169+
source: 'preview',
170+
});
167171
createAuditAction({
168172
action: "user.performed_find_references",
169173
metadata: {

packages/web/src/app/api/(server)/chat/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ const getAISDKLanguageModelAndOptions = async (config: LanguageModel, orgId: num
387387

388388
return {
389389
model: vertex(modelId),
390+
providerOptions: {
391+
google: {
392+
thinkingConfig: {
393+
thinkingBudget: env.GOOGLE_VERTEX_THINKING_BUDGET_TOKENS,
394+
includeThoughts: env.GOOGLE_VERTEX_INCLUDE_THOUGHTS === 'true',
395+
}
396+
}
397+
},
390398
};
391399
}
392400
case 'google-vertex-anthropic': {

packages/web/src/env.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ export const env = createEnv({
116116
GOOGLE_VERTEX_PROJECT: z.string().optional(),
117117
GOOGLE_VERTEX_REGION: z.string().default('us-central1'),
118118
GOOGLE_APPLICATION_CREDENTIALS: z.string().optional(),
119+
GOOGLE_VERTEX_THINKING_BUDGET_TOKENS: numberSchema.default(-1),
120+
GOOGLE_VERTEX_INCLUDE_THOUGHTS: booleanSchema.default('true'),
119121

120122
AWS_ACCESS_KEY_ID: z.string().optional(),
121123
AWS_SECRET_ACCESS_KEY: z.string().optional(),

packages/web/src/features/chat/components/chatThread/chatThread.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ export const ChatThread = ({
278278
return (
279279
<Fragment key={index}>
280280
<ChatThreadListItem
281+
index={index}
281282
chatId={chatId}
282283
userMessage={userMessage}
283284
assistantMessage={assistantMessage}

0 commit comments

Comments
 (0)