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:
@@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import { useOpencodeStore } from '@/stores/opencode';
|
||||
import { codingWorkspaceStore } from '@/stores/coding-workspace';
|
||||
import { usePartnerProfilesStore } from '@/stores/partner-profiles';
|
||||
import { useProviderStore } from '@/stores/providers';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
@@ -52,7 +52,7 @@ function resetStores() {
|
||||
projectRuntimeConfigsByProjectId: {
|
||||
prj_1: {
|
||||
'makelore-pm-cloud': {
|
||||
filePath: 'D:/repo/.opencode/agent/makelore-pm-cloud.md',
|
||||
filePath: 'D:/repo/local/agent/makelore-pm-cloud.md',
|
||||
skillIds: ['pm-project-plan'],
|
||||
updatedAt: '2026-07-04T00:00:00.000Z',
|
||||
},
|
||||
@@ -60,7 +60,7 @@ function resetStores() {
|
||||
},
|
||||
profilesById: {},
|
||||
});
|
||||
useOpencodeStore.setState({
|
||||
codingWorkspaceStore.setState({
|
||||
activeProject: {
|
||||
id: 'prj_1',
|
||||
path: 'D:/repo',
|
||||
@@ -69,9 +69,7 @@ function resetStores() {
|
||||
updatedAt: '2026-07-04T00:00:00.000Z',
|
||||
lastOpenedAt: '2026-07-04T00:00:00.000Z',
|
||||
},
|
||||
sessions: [{ id: 'sess_1', title: 'Local session' }],
|
||||
sessionsByProjectId: { prj_1: [{ id: 'sess_1', title: 'Local session' }] },
|
||||
selectedSessionId: 'sess_1',
|
||||
conversations: [{ id: 'sess_1', title: 'Local session' }],
|
||||
});
|
||||
useProviderStore.setState({
|
||||
statuses: [],
|
||||
@@ -129,7 +127,7 @@ describe('useUserSyncStore', () => {
|
||||
templateRoleId: 'custom',
|
||||
description: 'Global cloud partner',
|
||||
skillIds: ['pm-project-plan'],
|
||||
filePath: 'D:/other/.opencode/agent/makelore-pm-cloud.md',
|
||||
filePath: 'D:/other/local/agent/makelore-pm-cloud.md',
|
||||
projectRuntimeConfigsByProjectId: { other: { filePath: 'D:/other/file.md' } },
|
||||
createdAt: '2026-07-04T00:00:00.000Z',
|
||||
updatedAt: '2026-07-04T00:00:00.000Z',
|
||||
@@ -163,8 +161,8 @@ describe('useUserSyncStore', () => {
|
||||
updatedAt: '2026-07-04T00:00:00.000Z',
|
||||
}]);
|
||||
expect(usePartnerProfilesStore.getState().projectRuntimeConfigsByProjectId).toHaveProperty('prj_1');
|
||||
expect(useOpencodeStore.getState().activeProject?.id).toBe('prj_1');
|
||||
expect(useOpencodeStore.getState().sessions).toHaveLength(1);
|
||||
expect(codingWorkspaceStore.getState().activeProject?.id).toBe('prj_1');
|
||||
expect(codingWorkspaceStore.getState().conversations).toHaveLength(1);
|
||||
expect(fetchProviderSnapshotMock).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
@@ -198,7 +196,7 @@ describe('useUserSyncStore', () => {
|
||||
id: 'makelore-pm-test',
|
||||
displayName: 'PM',
|
||||
templateRoleId: 'custom',
|
||||
filePath: 'D:/repo/.opencode/agent/makelore-pm-test.md',
|
||||
filePath: 'D:/repo/local/agent/makelore-pm-test.md',
|
||||
skillIds: ['pm-project-plan'],
|
||||
createdAt: '2026-07-04T00:00:00.000Z',
|
||||
updatedAt: '2026-07-04T00:00:00.000Z',
|
||||
|
||||
Reference in New Issue
Block a user