feat: remove legacy OpenCode runtime

Cut product flows over to Coding/Pi and retain only the migration-owned v1 boundary. Promote supported native optional packages because electron-builder omitted pnpm transitive optional closure from the packaged ASAR.
This commit is contained in:
brother7 committed 2026-08-24 12:17:43 +08:00
1 parent 61fede2b4d
commit 5a275b93a7
199 files changed
+1330 -64725

No files matched your search

+1 -13
View File
@@ -5,19 +5,12 @@ import { Models } from '@/pages/Models/index';
const hostApiFetchMock = vi.fn();
const trackUiEventMock = vi.fn();
const { opencodeState, settingsState } = vi.hoisted(() => ({
opencodeState: {
status: { state: 'running', port: 4096, url: 'http://127.0.0.1:4096', startedAt: 1, pid: 1234 },
},
const { settingsState } = vi.hoisted(() => ({
settingsState: {
devModeUnlocked: false,
},
}));
vi.mock('@/stores/opencode', () => ({
useOpencodeStore: (selector: (state: typeof opencodeState) => unknown) => selector(opencodeState),
}));
vi.mock('@/stores/settings', () => ({
useSettingsStore: (selector: (state: typeof settingsState) => unknown) => selector(settingsState),
}));
@@ -38,10 +31,6 @@ vi.mock('@/components/common/FeedbackState', () => ({
FeedbackState: ({ title }: { title: string }) => <div>{title}</div>,
}));
vi.mock('@/pages/Models/OpencodeRuntimePanel', () => ({
OpencodeRuntimePanel: () => null,
}));
vi.mock('react-i18next', () => ({
useTranslation: () => ({
t: (key: string, fallback?: string | { count?: number }) => {
@@ -70,7 +59,6 @@ describe('Models page auto refresh', () => {
beforeEach(() => {
vi.useFakeTimers();
vi.clearAllMocks();
opencodeState.status = { state: 'running', port: 4096, url: 'http://127.0.0.1:4096', startedAt: 1, pid: 1234 };
Object.defineProperty(document, 'visibilityState', {
configurable: true,
value: 'visible',