From f9cb7ea9f536987fe50f07f32167cf93f61cd320 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Thu, 15 Oct 2026 21:49:40 +0800 Subject: [PATCH] fix(desktop): align runtime patch policy with pi-ai 1.2.0 --- apps/desktop/scripts/runtime-patch-policy.ts | 6 +++--- apps/desktop/tests/prepare-runtime-patches.spec.ts | 4 ++-- .../v0.2.1-alpha.4/pi-ai-model-catalog/guide.i18n.yaml | 10 +++++----- .../v0.2.1-alpha.4/pi-ai-model-catalog/guide.md | 2 +- .../v0.2.1-alpha.4/pi-ai-model-catalog/guide.zh.md | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/desktop/scripts/runtime-patch-policy.ts b/apps/desktop/scripts/runtime-patch-policy.ts index d2ea174f2c..fd54b6f292 100644 --- a/apps/desktop/scripts/runtime-patch-policy.ts +++ b/apps/desktop/scripts/runtime-patch-policy.ts @@ -8,7 +8,7 @@ export type DesktopRuntimePatch = /** Every workspace patch requires an explicit Desktop decision; runtime-only entries may add or replace a patch. */ export const DESKTOP_RUNTIME_PATCHES: Readonly> = { - '@earendil-works/pi-ai@1.1.0': { scope: 'shared', reason: 'Runtime providers need the streamed argument parsing fix.' }, + '@earendil-works/pi-ai@1.2.0': { scope: 'shared', reason: 'Runtime providers need the streamed argument parsing fix.' }, '@electron/osx-sign@1.3.3': { scope: 'workspace-only', reason: 'Signing executes on the build host.' }, '@fortune-sheet/core@1.0.4': { scope: 'workspace-only', reason: 'Patched spreadsheet code is embedded in the client bundle.' }, '@fortune-sheet/react@1.0.4': { scope: 'workspace-only', reason: 'Patched spreadsheet code is embedded in the client bundle.' }, @@ -20,6 +20,6 @@ export const DESKTOP_RUNTIME_PATCHES: Readonly> = { - // The provider declares ^1.1.0; its patch is qualified against 1.1.0. - '@earendil-works/pi-ai@^1.1.0': '1.1.0', + // The provider declares ^1.2.0; its patch is qualified against 1.2.0. + '@earendil-works/pi-ai@^1.2.0': '1.2.0', } diff --git a/apps/desktop/tests/prepare-runtime-patches.spec.ts b/apps/desktop/tests/prepare-runtime-patches.spec.ts index 84c71a1884..7230382a67 100644 --- a/apps/desktop/tests/prepare-runtime-patches.spec.ts +++ b/apps/desktop/tests/prepare-runtime-patches.spec.ts @@ -42,11 +42,11 @@ it('classifies the current workspace and shares only runtime patch bytes', () => const repository = resolve(import.meta.dirname, '../../..') const before = readFileSync(join(repository, 'pnpm-lock.yaml')) const plan = prepareRuntimePatches(project, repository) - expect(plan.patches.map(entry => entry.spec)).toEqual(['@earendil-works/pi-ai@1.1.0', 'node-pty@1.2.0-beta.15']) + expect(plan.patches.map(entry => entry.spec)).toEqual(['@earendil-works/pi-ai@1.2.0', 'node-pty@1.2.0-beta.15']) expect(plan.workspaceOnly).toHaveLength(6) const settings = yaml.load(readFileSync(join(project, 'pnpm-workspace.yaml'), 'utf8')) as { overrides: Record } expect(settings.overrides['@earendil-works/pi-ai']).toBeUndefined() - expect(settings.overrides['@earendil-works/pi-ai@^1.1.0']).toBe('1.1.0') + expect(settings.overrides['@earendil-works/pi-ai@^1.2.0']).toBe('1.2.0') expect(readFileSync(join(repository, 'pnpm-lock.yaml'))).toEqual(before) }) diff --git a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.i18n.yaml b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.i18n.yaml index 08329e03d8..ffe72f22d5 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.i18n.yaml +++ b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.i18n.yaml @@ -5,12 +5,12 @@ /: en: 3d2fec5fa8405395 zh: b8617482168609b1 -/pi-ai-model-catalog: - en: ad7d66838bb7f924 - zh: d4b120332acf786f -/pi-ai-model-catalog/change: +/pi-ai-1-2-0-removes-model-ids-and-lowers-sonnet-4-5-context: + en: 793381c1cb58d941 + zh: de53660729d48116 +/pi-ai-1-2-0-removes-model-ids-and-lowers-sonnet-4-5-context/change: en: 0948c8c82d4f8256 zh: 763504917909d130 -/pi-ai-model-catalog/migration: +/pi-ai-1-2-0-removes-model-ids-and-lowers-sonnet-4-5-context/migration: en: 6db9f70e6db44b3c zh: 34156f7446a78bc1 diff --git a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.md b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.md index 72c9d8eaf6..a7ac30061a 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.md +++ b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.md @@ -3,7 +3,7 @@ kind: upgrade-guide description: "The pi-ai 1.2.0 catalog removes model IDs and lowers the default context limit for Anthropic Sonnet 4.5." --- -# pi-ai model catalog +# pi-ai 1.2.0 removes model IDs and lowers Sonnet 4.5 context English | [中文](guide.zh.md) diff --git a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.zh.md b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.zh.md index ad87c026b4..b9d61ceff1 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.zh.md +++ b/docs/upgrade-guide/v0.2.1-alpha.4/pi-ai-model-catalog/guide.zh.md @@ -3,7 +3,7 @@ kind: upgrade-guide description: "pi-ai 1.2.0 目录移除了部分模型 ID,并降低了 Anthropic Sonnet 4.5 的默认上下文限制。" --- -# pi-ai 模型目录 +# pi-ai 1.2.0 移除部分模型 ID 并降低 Sonnet 4.5 上下文限制 [English](guide.md) | 中文