mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Feat/assistant session list (#198)
* feat: add assistant mode integration and fix test environment - Add assistant-mode service for managing assistant workspace files (AGENTS.md, opencode.json) - Add backend GET/POST routes for assistant-mode status and initialization - Add AssistantRedirect page and useAssistantSessionLauncher hook - Update mobile navigation to include Assistant tab (replaces Alerts) - Fix React.act compatibility by setting NODE_ENV=test in vitest config - Add shared Zod schemas for AssistantMode types and requests * feat: enhance assistant mode with session list view and legacy config migration - Add session list view for assistant mode with full workspace management - Migrate legacy opencode.json permission format to granular permissions - Enable assistant navigation from mobile tab bar and repo switcher - Preserve assistant context in session routes via query params - Auto-restart OpenCode server after assistant mode initialization - Add comprehensive tests for legacy config detection and navigation
This commit is contained in:
1 parent
0a2e337efc
commit
c894ff5756
22 files changed
+1347
-154
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import type { Repo } from './types'
|
||||
import { FetchError, fetchWrapper, fetchWrapperVoid, fetchWrapperBlob } from './fetchWrapper'
|
||||
import { API_BASE_URL } from '@/config'
|
||||
import type { DiscoverReposResponse } from '@opencode-manager/shared/types'
|
||||
import type { DiscoverReposResponse, AssistantModeStatus, AssistantModeInitRequest } from '@opencode-manager/shared/types'
|
||||
|
||||
export interface CreateRepoOptions {
|
||||
repoUrl?: string
|
||||
@@ -166,3 +166,20 @@ export async function touchRepoActivity(id: number): Promise<void> {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
export async function getAssistantModeStatus(id: number): Promise<AssistantModeStatus> {
|
||||
return fetchWrapper(`${API_BASE_URL}/api/repos/${id}/assistant-mode`, {
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
export async function initializeAssistantMode(
|
||||
id: number,
|
||||
options?: AssistantModeInitRequest
|
||||
): Promise<AssistantModeStatus> {
|
||||
return fetchWrapper(`${API_BASE_URL}/api/repos/${id}/assistant-mode`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(options ?? {}),
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user