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,