feat(vscode): statut git détaillé, sessions archivées, lien IDE web, fetch/pull (0.2.0)
Reflète la refonte IDE en supervision légère, sans dupliquer l'éditeur : - statut git fin dans l'arbre (staged/unstaged/conflits + dernier commit) ; - commande « Open Worktree IDE » → deep-link /workspace/:repoId/:wt ; - commandes fetch / pull (ff-only|rebase) sur les worktrees ; - event WS session_archived + réglage showArchivedSessions (badge + filtre). README/CHANGELOG + tests (config/rest-client/ws-client).
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import type { GroupSummary, RepoSummary, SessionSummary, WorktreeSummary } from '@arboretum/shared';
|
||||
import { RestError, type RestClient } from './api/rest-client.js';
|
||||
import { workspaceUrl } from './config.js';
|
||||
import type { ArbWsClient, AttachmentSink } from './api/ws-client.js';
|
||||
import type { Store } from './state/store.js';
|
||||
import type { SessionTerminalManager } from './terminal/session-pty.js';
|
||||
@@ -174,10 +175,43 @@ export function registerCommands(context: vscode.ExtensionContext, deps: Command
|
||||
}),
|
||||
);
|
||||
});
|
||||
cmd('arboretum.fetchWorktree', (node) => {
|
||||
const wt = asWorktree(node as AnyNode);
|
||||
if (!wt) return;
|
||||
void vscode.window.withProgress({ location: vscode.ProgressLocation.Notification, title: 'Arboretum: fetching…' }, () =>
|
||||
run('fetch', async () => {
|
||||
await rest.fetchWorktree(wt.repoId, { path: wt.worktree.path });
|
||||
void vscode.window.showInformationMessage('Arboretum: fetched.');
|
||||
}),
|
||||
);
|
||||
});
|
||||
cmd('arboretum.pullWorktree', (node) => {
|
||||
const wt = asWorktree(node as AnyNode);
|
||||
if (!wt) return;
|
||||
void run('pull', async () => {
|
||||
const mode = await vscode.window.showQuickPick(
|
||||
[
|
||||
{ label: 'Fast-forward only', mode: 'ff-only' as const },
|
||||
{ label: 'Rebase', mode: 'rebase' as const },
|
||||
],
|
||||
{ placeHolder: 'Pull strategy' },
|
||||
);
|
||||
if (!mode) return;
|
||||
await vscode.window.withProgress({ location: vscode.ProgressLocation.Notification, title: 'Arboretum: pulling…' }, async () => {
|
||||
await rest.pullWorktree(wt.repoId, { path: wt.worktree.path, mode: mode.mode });
|
||||
void vscode.window.showInformationMessage('Arboretum: pulled.');
|
||||
});
|
||||
});
|
||||
});
|
||||
cmd('arboretum.promoteWorktree', (node) => {
|
||||
const wt = asWorktree(node as AnyNode);
|
||||
if (wt) void promoteWorktreeFlow(deps, wt.repoId, wt.worktree);
|
||||
});
|
||||
cmd('arboretum.openWorktreeIde', (node) => {
|
||||
const wt = asWorktree(node as AnyNode);
|
||||
if (!wt) return;
|
||||
void vscode.env.openExternal(vscode.Uri.parse(workspaceUrl(rest.url, wt.repoId, wt.worktree.path)));
|
||||
});
|
||||
|
||||
// ---- démarrage de session ----
|
||||
cmd('arboretum.startSession', (node) => {
|
||||
|
||||
Reference in New Issue
Block a user