From 88def1264d349b5422c994d54d0c35b22724f724 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 30 Dec 2025 12:19:10 -0600 Subject: [PATCH] Fix "mode" parameter in system prompt --- src/components/git-sync/GitSyncButton.tsx | 2 +- src/lib/SessionManager.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/git-sync/GitSyncButton.tsx b/src/components/git-sync/GitSyncButton.tsx index b55feb77..ad8bc1ca 100644 --- a/src/components/git-sync/GitSyncButton.tsx +++ b/src/components/git-sync/GitSyncButton.tsx @@ -51,7 +51,7 @@ export function GitSyncButton({ projectId, className }: GitSyncButtonProps) { } // Purple indicator: no remote configured, but has commits - lowest priority - const needsRemote = !hasRemote && totalCommits >= 2; + const needsRemote = !hasRemote && totalCommits > 1; if (needsRemote) { return ; } diff --git a/src/lib/SessionManager.ts b/src/lib/SessionManager.ts index 98c36dbf..2d5d24f7 100644 --- a/src/lib/SessionManager.ts +++ b/src/lib/SessionManager.ts @@ -297,13 +297,14 @@ export class SessionManager { baseURL: provider.baseURL, }; - // Get imageModel from settings + const cwd = `${config.fsPathProjects}/${projectId}`; + const commits = await this.git.log({ dir: cwd }); const settings = this.getSettings(); const systemPrompt = await makeSystemPrompt({ - cwd: `${config.fsPathProjects}/${projectId}`, + cwd, fs: this.fs, - mode: "agent", + mode: commits.length > 1 ? "agent" : "init", tools: Object.values(session.tools), config, defaultConfig,