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:
@@ -4,7 +4,7 @@ import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom';
|
||||
import { ModuleSwitcher } from '@/components/layout/ModuleSwitcher';
|
||||
import { ModuleSelection } from '@/pages/ModuleSelection';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import { useOpencodeStore } from '@/stores/opencode';
|
||||
import { codingWorkspaceStore } from '@/stores/coding-workspace';
|
||||
import { useUserProfileStore } from '@/stores/user-profile';
|
||||
|
||||
const { hostApiFetchMock } = vi.hoisted(() => ({
|
||||
@@ -34,7 +34,7 @@ describe('AI module navigation', () => {
|
||||
legacyRefreshToken: null,
|
||||
user: { username: 'zhangsan@example.com', userId: 'user-1', tenantId: null, deptId: null, authorities: [] },
|
||||
});
|
||||
useOpencodeStore.setState({ activeProject: null });
|
||||
codingWorkspaceStore.setState({ activeProject: null });
|
||||
useUserProfileStore.setState({ profilesByUserId: {}, syncStatesByUserId: {} });
|
||||
hostApiFetchMock.mockResolvedValue({
|
||||
success: true,
|
||||
@@ -160,7 +160,7 @@ describe('AI module navigation', () => {
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByTestId('ai-module-option-programming'));
|
||||
expect(await screen.findByTestId('location-path')).toHaveTextContent('/opencode-chat');
|
||||
expect(await screen.findByTestId('location-path')).toHaveTextContent('/chat');
|
||||
});
|
||||
|
||||
it('keeps the chooser public and sends signed-out users to login when they choose a module', async () => {
|
||||
@@ -289,7 +289,7 @@ describe('AI module navigation', () => {
|
||||
|
||||
it('keeps breathing room around the compact module switcher trigger', () => {
|
||||
render(
|
||||
<MemoryRouter initialEntries={['/opencode-chat']}>
|
||||
<MemoryRouter initialEntries={['/chat']}>
|
||||
<ModuleSwitcher sidebarCollapsed={false} compact />
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user