feat: add integrate commits to parental branch section and wired UI
Introduce IntegrateCommitsSection to plan and apply commits from source to target branch Wire the integration panel into GitView so users can run integrate flow from the current worktree
This commit is contained in:
@@ -574,7 +574,7 @@ export const useSessionStore = create<SessionStore>()(
|
||||
}
|
||||
});
|
||||
|
||||
// Check if .openchamber directory exists before trying to list it
|
||||
// LEGACY_WORKTREES: check if .openchamber directory exists before listing it
|
||||
// LEGACY_WORKTREES: filesystem scan fallback for legacy <project>/.openchamber/*
|
||||
const projectEntriesList = await opencodeClient.listLocalDirectory(normalizedProject);
|
||||
const worktreeDirExists = projectEntriesList.some(
|
||||
|
||||
@@ -9,6 +9,7 @@ import type { WorktreeMetadata } from '@/types/worktree';
|
||||
import { listWorktrees, mapWorktreeToMetadata } from '@/lib/git/worktreeService';
|
||||
import type { Session } from '@opencode-ai/sdk/v2';
|
||||
|
||||
// LEGACY_WORKTREES: legacy worktree root inside project.
|
||||
const OPENCHAMBER_DIR = '.openchamber';
|
||||
|
||||
const resolveProjectDirectory = (currentDirectory: string | null | undefined): string | null => {
|
||||
|
||||
@@ -167,6 +167,11 @@ export const useMultiRunStore = create<MultiRunStore>()(
|
||||
startPoint: startPoint ?? null,
|
||||
});
|
||||
|
||||
const enrichedMetadata = {
|
||||
...worktreeMetadata,
|
||||
createdFromBranch: startPoint ?? 'HEAD',
|
||||
};
|
||||
|
||||
// Session title format: groupSlug/provider/model (or groupSlug/provider/model/index for duplicates)
|
||||
const sessionTitle = count > 1
|
||||
? `${groupSlug}/${model.providerID}/${model.modelID}/${index}`
|
||||
@@ -177,7 +182,7 @@ export const useMultiRunStore = create<MultiRunStore>()(
|
||||
() => opencodeClient.createSession({ title: sessionTitle })
|
||||
);
|
||||
|
||||
useSessionStore.getState().setWorktreeMetadata(session.id, worktreeMetadata);
|
||||
useSessionStore.getState().setWorktreeMetadata(session.id, enrichedMetadata);
|
||||
|
||||
createdRuns.push({
|
||||
sessionId: session.id,
|
||||
|
||||
Reference in New Issue
Block a user