Skip to content

Commit d441acb

Browse files
committed
Merge branch 'main' into e2e
2 parents d2639b7 + 6d8ddcf commit d441acb

Some content is hidden

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

42 files changed

+1269
-1084
lines changed

backend/src/find-files/request-files-prompt.ts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -263,22 +263,17 @@ async function getRelevantFiles(
263263
const start = performance.now()
264264
let coreMessages = coreMessagesWithSystem(messagesWithPrompt, system)
265265

266-
if (costMode === 'experimental') {
267-
coreMessages = coreMessages
268-
.map((msg, i) => {
269-
if (msg.role === 'assistant' && i !== coreMessages.length - 1) {
270-
return castAssistantMessage(msg)
271-
} else {
272-
return msg
273-
}
274-
})
275-
.filter((msg) => msg !== null)
276-
}
277-
// This finetunedModel is used for the promptFlashWithFallbacks call
278-
const finetunedModel =
279-
costMode === 'experimental'
280-
? finetunedVertexModels.ft_filepicker_010
281-
: finetunedVertexModels.ft_filepicker_005
266+
// Converts assistant messages to user messages for finetuned model
267+
coreMessages = coreMessages
268+
.map((msg, i) => {
269+
if (msg.role === 'assistant' && i !== coreMessages.length - 1) {
270+
return castAssistantMessage(msg)
271+
} else {
272+
return msg
273+
}
274+
})
275+
.filter((msg) => msg !== null)
276+
const finetunedModel = finetunedVertexModels.ft_filepicker_010
282277

283278
let response = await promptFlashWithFallbacks(coreMessages, {
284279
clientSessionId,

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"typescript-eslint": "^8.32.0",
160160
},
161161
"optionalDependencies": {
162-
"@homebridge/node-pty-prebuilt-multiarch": "0.12.0-beta.5",
162+
"@homebridge/node-pty-prebuilt-multiarch": "0.12.0",
163163
},
164164
},
165165
"packages/bigquery": {
@@ -662,7 +662,7 @@
662662

663663
"@grpc/proto-loader": ["@grpc/proto-loader@0.7.15", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.2.5", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ=="],
664664

665-
"@homebridge/node-pty-prebuilt-multiarch": ["@homebridge/node-pty-prebuilt-multiarch@0.12.0-beta.5", "", { "dependencies": { "node-addon-api": "^7.1.0", "prebuild-install": "^7.1.2", "semver": "^7.6.3" } }, "sha512-i6J1ryzzDE0XY6caawiq5tymY6wbqoO6cBag31Hu6omDWSG0d93YapYab6uP2GJyelYvTJyxJcapOUI9MxYnEg=="],
665+
"@homebridge/node-pty-prebuilt-multiarch": ["@homebridge/node-pty-prebuilt-multiarch@0.12.0", "", { "dependencies": { "node-addon-api": "^7.1.0", "prebuild-install": "^7.1.2" } }, "sha512-hJCGcfOnMeRh2KUdWPlVN/1egnfqI4yxgpDhqHSkF2DLn5fiJNdjEHHlcM1K2w9+QBmRE2D/wfmM4zUOb8aMyQ=="],
666666

667667
"@hookform/resolvers": ["@hookform/resolvers@3.10.0", "", { "peerDependencies": { "react-hook-form": "^7.0.0" } }, "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag=="],
668668

codebuff-export-agent-mode-planning.md

Lines changed: 0 additions & 140 deletions
This file was deleted.

codebuff.json

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,46 @@
1515
"fileChangeHooks": [
1616
{
1717
"name": "backend-unit-tests",
18-
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev $'\\x1b\\[[0-9;]*m' | grep -Ev '^s*[0-9]+s+(pass|skip)|(pass)|(skip)' && bun run typecheck-only",
18+
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev '✓|\\(pass\\)'",
1919
"cwd": "backend",
2020
"filePattern": "backend/**/*.ts"
2121
},
22+
{
23+
"name": "backend-typecheck",
24+
"command": "bun run typecheck-only",
25+
"cwd": "backend",
26+
"filePattern": "backend/**/*.ts"
27+
},
28+
2229
{
2330
"name": "npm-app-unit-tests",
24-
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev $'\\x1b\\[[0-9;]*m' | grep -Ev '^s*[0-9]+s+(pass|skip)|(pass)|(skip)' && bun run typecheck-only",
31+
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev '✓|\\(pass\\)'",
32+
"cwd": "npm-app",
33+
"filePattern": "npm-app/**/*.ts"
34+
},
35+
{
36+
"name": "npm-typecheck",
37+
"command": "bun run typecheck-only",
2538
"cwd": "npm-app",
2639
"filePattern": "npm-app/**/*.ts"
2740
},
41+
42+
{
43+
"name": "web-typecheck",
44+
"command": "bun run typecheck-only",
45+
"cwd": "web",
46+
"filePattern": "web/**/*.ts"
47+
},
48+
2849
{
2950
"name": "common-unit-tests",
30-
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev $'\\x1b\\[[0-9;]*m' | grep -Ev '^s*[0-9]+s+(pass|skip)|(pass)|(skip)' && bun run typecheck-only",
51+
"command": "set -o pipefail && bun test $(find src -name *.test.ts ! -name *.integration.test.ts) 2>&1 | grep -Ev '✓|\\(pass\\)'",
52+
"cwd": "common",
53+
"filePattern": "common/**/*.ts"
54+
},
55+
{
56+
"name": "common-typecheck",
57+
"command": "bun run typecheck-only",
3158
"cwd": "common",
3259
"filePattern": "common/**/*.ts"
3360
}

common/src/constants.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,11 @@ export const geminiModels = {
168168
gemini2_5_flash: 'gemini-2.5-flash-preview-05-20',
169169
gemini2_5_flash_thinking: 'gemini-2.5-flash-preview-05-20:thinking',
170170
gemini2flash: 'gemini-2.0-flash-001',
171-
gemini2_5_pro_exp: 'gemini-2.5-pro-exp-03-25',
172-
gemini2_5_pro_preview: 'gemini-2.5-pro-preview-05-06',
171+
gemini2_5_pro_preview: 'gemini-2.5-pro-preview-06-05',
173172
} as const
174173
export type GeminiModel = (typeof geminiModels)[keyof typeof geminiModels]
175174

176175
export const openrouterModels = {
177-
openrouter_gemini2_5_pro_exp: 'google/gemini-2.5-pro-exp-03-25:free',
178176
openrouter_gemini2_5_pro_preview: 'google/gemini-2.5-pro-preview-03-25',
179177
openrouter_gemini2_5_flash: 'google/gemini-2.5-flash-preview',
180178
openrouter_gemini2_5_flash_thinking:
@@ -199,6 +197,7 @@ export const finetunedVertexModels = {
199197
ft_filepicker_topk_002: '1694861989844615168',
200198
ft_filepicker_010: '3808739064941641728',
201199
ft_filepicker_010_epoch_2: '6231675664466968576',
200+
ft_filepicker_topk_003: '1502192368286171136',
202201
} as const
203202
export const finetunedVertexModelNames: Record<string, string> = {
204203
[finetunedVertexModels.ft_filepicker_003]: 'ft_filepicker_003',
@@ -210,6 +209,7 @@ export const finetunedVertexModelNames: Record<string, string> = {
210209
[finetunedVertexModels.ft_filepicker_010]: 'ft_filepicker_010',
211210
[finetunedVertexModels.ft_filepicker_010_epoch_2]:
212211
'ft_filepicker_010_epoch_2',
212+
[finetunedVertexModels.ft_filepicker_topk_003]: 'ft_filepicker_topk_003',
213213
}
214214
export type FinetunedVertexModel =
215215
(typeof finetunedVertexModels)[keyof typeof finetunedVertexModels]
@@ -236,7 +236,6 @@ export const shortModelNames = {
236236

237237
export const providerModelNames = {
238238
[models.gemini2_5_pro_preview]: 'gemini',
239-
[models.gemini2_5_pro_exp]: 'gemini',
240239
[models.gemini2flash]: 'gemini',
241240
[models.gemini2_5_flash]: 'gemini',
242241
[models.gemini2_5_flash_thinking]: 'gemini',

common/src/util/string.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,13 @@ export const stripNullChars = (str: string): string => {
268268
return str.replace(/\u0000/g, '')
269269
}
270270

271-
const ansiRegex = /\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g
271+
const ansiColorsRegex = /\x1B\[[0-9;]*m/g
272272
export function stripColors(str: string): string {
273+
return str.replace(ansiColorsRegex, '')
274+
}
275+
276+
const ansiRegex = /\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x1B]*\x1B\\?)/g
277+
export function stripAnsi(str: string): string {
273278
return str.replace(ansiRegex, '')
274279
}
275280

@@ -284,3 +289,29 @@ export function includesMatch(
284289
return p.test(value)
285290
})
286291
}
292+
293+
/**
294+
* Finds the longest substring that is **both** a suffix of `source`
295+
* **and** a prefix of `next`.
296+
* Useful when concatenating strings while avoiding duplicate overlap.
297+
*
298+
* @example
299+
* ```ts
300+
* suffixPrefixOverlap('foobar', 'barbaz'); // ➜ 'bar'
301+
* suffixPrefixOverlap('abc', 'def'); // ➜ ''
302+
* ```
303+
*
304+
* @param source The string whose **suffix** is inspected.
305+
* @param next The string whose **prefix** is inspected.
306+
* @returns The longest overlapping edge, or an empty string if none exists.
307+
*/
308+
export function suffixPrefixOverlap(source: string, next: string): string {
309+
for (let len = next.length; len > 0; len--) {
310+
const prefix = next.slice(0, len)
311+
if (source.endsWith(prefix)) {
312+
return prefix
313+
}
314+
}
315+
316+
return ''
317+
}

evals/git-evals/email-eval-results.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sendBasicEmail } from '@codebuff/integrations'
1+
import { sendBasicEmail } from '../../packages/integrations/src'
22
import { FullEvalLog } from './types'
33
import { PostEvalAnalysis } from './post-eval-analysis'
44

0 commit comments

Comments
 (0)