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:
2026-08-24 12:17:43 +08:00
parent 61fede2b4d
commit 5a275b93a7
199 changed files with 1330 additions and 64725 deletions

View File

@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { MainLayout } from '@/components/layout/MainLayout';
import { useOpencodeStore } from '@/stores/opencode';
import { codingWorkspaceStore } from '@/stores/coding-workspace';
import { useProjectConfigStore } from '@/stores/project-config';
import { useSettingsStore } from '@/stores/settings';
import { createProjectConfig } from '../../shared/project-config';
@@ -54,7 +54,7 @@ describe('MainLayout module isolation', () => {
updatedAt: '',
lastOpenedAt: '',
};
useOpencodeStore.setState({ activeProject: project });
codingWorkspaceStore.setState({ activeProject: project });
useProjectConfigStore.setState({
configsByProjectId: {
[project.id]: { ...createProjectConfig(), initialized: false },
@@ -99,14 +99,14 @@ describe('MainLayout module isolation', () => {
});
it('keeps the local project initialization gate for AI programming routes', () => {
renderLayout('/opencode-chat');
renderLayout('/chat');
expect(screen.getByTestId('project-initialization-gate')).toBeVisible();
expect(screen.getByTestId('titlebar-stub')).toHaveAttribute('data-overlay', 'false');
});
it('keeps the programming workspace padding compensation separate from painting', () => {
renderLayout('/opencode-chat');
renderLayout('/chat');
expect(screen.getByTestId('main-content')).toHaveClass('basis-0', 'overflow-hidden', 'p-0', 'sm:p-6');
});