Skip to content

Commit 34e4659

Browse files
authored
Update version 2.8.12 (#1278)
* chore: update version to 2.8.12 and update changelog * feat: add built-in skills notification
1 parent e28b978 commit 34e4659

16 files changed

Lines changed: 503 additions & 275 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- Add timeout option to CoStrict model fetching and caching (#1276)
88
- Migrate pnpm config to workspace yaml and apply security overrides (#1273)
99
- Fix vitest Mock type compatibility and add missing node types (#1273)
10+
- Add built-in skills notification
11+
- Fix known issues
1012

1113
## [2.8.11]
1214

packages/telemetry/src/__tests__/PostHogTelemetryClient.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ describe("PostHogTelemetryClient", () => {
4848
optOut: vi.fn(),
4949
shutdown: vi.fn().mockResolvedValue(undefined),
5050
}
51-
;(PostHog as any).mockImplementation(() => mockPostHogClient)
51+
;(PostHog as any).mockImplementation(function () {
52+
return mockPostHogClient
53+
})
5254

5355
// @ts-expect-error - Accessing private static property for testing
5456
PostHogTelemetryClient._instance = undefined

pnpm-lock.yaml

Lines changed: 374 additions & 246 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ overrides:
6262
"qs@>=6.11.1 <=6.15.1": ">=6.15.2"
6363
"tmp@<0.2.6": ">=0.2.6"
6464
"axios@>=1.0.0 <1.16.0": ">=1.16.0"
65-
"vitest@<4.1.0": ">=4.1.0"
65+
"vitest": "3.2.6"
66+
"@ai-sdk/provider-utils": "4.0.27"

src/api/providers/costrict.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -951,11 +951,7 @@ export class CostrictAiHandler extends BaseProvider implements SingleCompletionH
951951
if (info.id !== id) {
952952
info.id = id
953953
}
954-
const _mid = id.toLowerCase()
955-
if (
956-
(_mid?.includes("auto") || _mid?.includes("kimi") || _mid?.includes("minimax") || _mid?.includes("glm") || _mid?.includes("deepseek-v4") || _mid?.includes("qwen-3")) &&
957-
info.preserveReasoning == null
958-
) {
954+
if (info.preserveReasoning == null) {
959955
info.preserveReasoning = true
960956
}
961957
return { id, info, ...params }

src/api/providers/fetchers/__tests__/modelCache.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ describe("empty cache protection", () => {
332332
})
333333

334334
expect(result).toEqual(diskModels)
335-
expect(mockGetCostrictModels).toHaveBeenCalledWith("https://api.example.com", "test-api-key", undefined)
335+
expect(mockGetCostrictModels).toHaveBeenCalledWith("https://api.example.com", "test-api-key", undefined, 2000)
336336

337337
await vi.waitFor(() => {
338338
expect(mockSet).toHaveBeenCalledWith("costrict", refreshedModels)

src/api/providers/fetchers/modelCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const getModels = async (options: GetModelsOptions): Promise<ModelRecord>
154154
models = undefined
155155
} else {
156156
if (!hadMemoryModels && refreshOnDiskCacheHit) {
157-
options.timeout = 2000 // Set a short timeout for the background refresh to prevent long waits on slow API responses
157+
options.timeout = 1000 // Set a short timeout for the background refresh to prevent long waits on slow API responses
158158
void refreshModels(options).catch((error) => {
159159
console.error(`[getModels] Background refresh failed for ${provider}:`, error)
160160
})

src/core/webview/webviewMessageHandler.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ import { ErrorCodeManager } from "../costrict/error-code"
8989
import { writeCostrictRuntimeAuth } from "../costrict/runtime-config"
9090
import { fetchCostrictQuotaInfo, fetchCostrictInviteCode } from "../../api/providers/fetchers/costrict"
9191
import { initNotificationService } from "../costrict/notification"
92-
import { installGitHubSkills } from "../../services/skills/github-skills-installer"
92+
import { initReviewSkills, showSkillsInitNotification } from "../../services/skills/github-skills-init"
9393
import delay from "delay"
9494
import { ensureProjectWikiSubtasksExists } from "../costrict/wiki/projectWikiHelpers"
9595
import { setPendingTodoList } from "../tools/UpdateTodoListTool"
@@ -782,8 +782,11 @@ export const webviewMessageHandler = async (
782782
})
783783

784784
void provider.getState().then((state) => {
785-
void installGitHubSkills(provider.context, state.language ?? "zh-CN")
786-
.then(() => provider.log("[BuiltinSkills] Bundled skills installed"))
785+
void initReviewSkills(provider.context, state.language ?? "zh-CN")
786+
.then((summary) => {
787+
provider.log("[BuiltinSkills] Bundled skills installed")
788+
showSkillsInitNotification(summary)
789+
})
787790
.catch((error) =>
788791
provider.log(
789792
`[BuiltinSkills] Failed to install: ${error instanceof Error ? error.message : String(error)}`,
@@ -854,8 +857,11 @@ export const webviewMessageHandler = async (
854857
// Initialize subtask files for the new language.
855858
await ensureProjectWikiSubtasksExists(newValue as string)
856859
// Reinstall bundled skills with the new locale
857-
void installGitHubSkills(provider.context, newValue as string)
858-
.then(() => provider.log("[BuiltinSkills] Bundled skills reinstalled"))
860+
void initReviewSkills(provider.context, newValue as string)
861+
.then((summary) => {
862+
provider.log("[BuiltinSkills] Bundled skills reinstalled")
863+
showSkillsInitNotification(summary)
864+
})
859865
.catch((error) =>
860866
provider.log(
861867
`[BuiltinSkills] Failed to reinstall: ${error instanceof Error ? error.message : String(error)}`,

src/i18n/costrict-i18n/locales/en/common.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@
215215
"notification": {
216216
"confirm": "Confirm"
217217
},
218+
"builtinSkills": {
219+
"init": "Built-in skills ({{skills}}) have been installed to {{path}}",
220+
"updated": "Built-in skills ({{skills}}) have been updated in {{path}}"
221+
},
218222
"ipc": {
219223
"connectionFailed": "IPC connection failed, unable to connect to local server",
220224
"reloadWindow": "Reload Window",

src/i18n/costrict-i18n/locales/zh-CN/common.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)