feat: migrate to OpenCode SDK v2
Update all import statements to use @opencode-ai/sdk/v2 Modify Vite configurations to alias new SDK path Update API client method signatures for SDK v2 compatibility
This commit is contained in:
@@ -400,10 +400,8 @@ export const DirectoryTree: React.FC<DirectoryTreeProps> = ({
|
||||
|
||||
const tempClient = opencodeClient.getApiClient();
|
||||
const response = await tempClient.file.list({
|
||||
query: {
|
||||
path: '.',
|
||||
directory: path
|
||||
}
|
||||
path: '.',
|
||||
directory: path
|
||||
});
|
||||
|
||||
if (!response.data) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import { RiCheckboxBlankLine, RiCheckboxLine, RiDeleteBinLine } from '@remixicon
|
||||
import { MobileOverlayPanel } from '@/components/ui/MobileOverlayPanel';
|
||||
import { DirectoryExplorerDialog } from './DirectoryExplorerDialog';
|
||||
import { cn, formatPathForDisplay } from '@/lib/utils';
|
||||
import type { Session } from '@opencode-ai/sdk';
|
||||
import type { Session } from '@opencode-ai/sdk/v2';
|
||||
import type { WorktreeMetadata } from '@/types/worktree';
|
||||
import {
|
||||
archiveWorktree,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import type { Session } from '@opencode-ai/sdk';
|
||||
import type { Session } from '@opencode-ai/sdk/v2';
|
||||
import { toast } from 'sonner';
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
||||
Reference in New Issue
Block a user