summaryrefslogtreecommitdiff
path: root/packages/server/src/core/prompts.ts
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-05-13 12:56:32 -0700
committerGitHub <[email protected]>2025-05-13 12:56:32 -0700
commit17cce0adf4766c337d0f75b2cedc68cdb3182b4b (patch)
tree427164232e32be8cb991bd2858283417cc75ed9a /packages/server/src/core/prompts.ts
parente2c3611c637f6d18fd5f6354e496b89cdb6bd173 (diff)
use git diff HEAD instead of git diff && git diff --staged (#333)
Diffstat (limited to 'packages/server/src/core/prompts.ts')
-rw-r--r--packages/server/src/core/prompts.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/server/src/core/prompts.ts b/packages/server/src/core/prompts.ts
index c2d4bc10..adf76751 100644
--- a/packages/server/src/core/prompts.ts
+++ b/packages/server/src/core/prompts.ts
@@ -115,10 +115,9 @@ ${(function () {
- The current working (project) directory is being managed by a git repository.
- When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
- \`git status\` to ensure that all relevant files are tracked & staged, using \`git add ...\` as needed.
- - \`git diff\` to review all unstaged changes in work tree.
- - \`git diff --staged\` to review all staged changes.
+ - \`git diff HEAD\` to review all changes to tracked files (both staged and unstaged) in work tree since last commit.
- \`git log -n 3\` to review recent commit messages and match their style (verbosity, formatting, signature line, etc.)
-- Combine shell commands whenever possible to save time/steps, e.g. \`git status && git diff && git diff --staged && git log -n 3\`.
+- Combine shell commands whenever possible to save time/steps, e.g. \`git status && git diff HEAD && git log -n 3\`.
- Always propose a draft commit message. Never just ask the user to give you the full commit message.
- Prefer commit messages that are clear, concise, and focused more on "why" and less on "what".
- Keep the user informed and ask for clarification or confirmation where needed.