Skip to content

Commit f7e33e6

Browse files
committed
Add diffs only option to commit message generation workflow
- revert all those lint fixes [Changes] - user should be able to select minimal option that only includes diffs - rename 'minimal diffs only' to 'Diffs only'. Rename 'Skip' to 'Include files', and the last option to 'Include files and context'. Update variable names as needed (to reflect translations) - rename 'minimal' to 'diffs only' - this shows '2k tokens' but the user is asked to select between 'diffs only' and 'include files' in the next step. Should first ask the user about it to have grounds to determine prompt size └── apps └── editor └── src ├── commands │ ├── apply-response-command │ │ ├── response-processor │ │ │ ├── handlers │ │ │ │ ├── patch-repair-handler.ts │ │ │ │ └── search-replace-handler.ts │ │ │ └── response-processor.ts │ │ └── utils │ │ ├── file-operations │ │ │ ├── prepare-rename-operation.ts │ │ │ └── read-rename-source-file.ts │ │ └── preview │ │ ├── build-history-files.ts │ │ ├── file-preparer.ts │ │ └── vscode-ui.ts │ ├── copy-merge-commit-details-command.ts │ ├── generate-commit-message-commands │ │ ├── actions │ │ │ ├── get-prompt-data.ts │ │ │ └── run-generate-action.ts │ │ ├── generate-commit-message-commands.ts │ │ ├── index.ts │ │ └── utils │ │ ├── build-commit-message-prompt.ts │ │ ├── generate-commit-message-with-api.ts │ │ ├── get-commit-message-config.ts │ │ └── strip-wrapping-quotes.ts │ ├── new-folder-command.ts │ ├── search-files-commands │ │ └── utils │ │ └── get-target-folder-path.ts │ ├── select-files-of-commit-command.ts │ └── set-ranges-command.ts ├── features │ └── search-files │ └── utils │ └── analyze-files.ts ├── i18n │ └── translations │ └── commands │ └── generate-commit-message-command.ts ├── services │ └── websocket-manager.ts ├── utils │ ├── agentic-cli-invocation │ │ ├── invoke-agentic-cli.ts │ │ └── utils │ │ └── check-command-exists.ts │ ├── git-repository-utils.ts │ └── path-sanitizer.ts └── views ├── prompt │ └── backend │ ├── message-handlers │ │ ├── handle-paste-url.ts │ │ ├── handle-preview-generated-code.ts │ │ └── utils │ │ └── build-cli-prompt.ts │ └── utils │ ├── persistent-text-storage.ts │ ├── preview-text-in-temp-file.ts │ ├── symbols │ │ ├── fragment │ │ │ └── replace-fragment-symbol.ts │ │ ├── image │ │ │ └── replace-image-symbol.ts │ │ ├── pasted-text │ │ │ └── replace-pasted-text-symbol.ts │ │ └── website │ │ └── replace-website-symbol.ts │ └── website-fetcher.ts ├── settings │ └── backend │ └── message-handlers │ ├── add-provider │ │ └── pick-extended-provider.ts │ ├── handle-open-allow-patterns-settings.ts │ └── handle-open-ignore-patterns-settings.ts └── shared └── utils └── hash-sign-quick-pick └── symbols ├── changes-symbol.ts └── saved-context-symbol.ts
1 parent f2487fe commit f7e33e6

4 files changed

Lines changed: 549 additions & 409 deletions

File tree

‎apps/editor/src/commands/generate-commit-message-commands/actions/get-prompt-data.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,20 @@ export const get_prompt_data = async (params: {
119119
return normalize_path(path.relative(workspace_root, f))
120120
})
121121

122+
const prompt_diffs_only = await build_commit_message_prompt(
123+
diff,
124+
params.repository,
125+
[],
126+
params.workspace_provider,
127+
true
128+
)
129+
122130
const prompt_without_context = await build_commit_message_prompt(
123131
diff,
124132
params.repository,
125133
[],
126-
params.workspace_provider
134+
params.workspace_provider,
135+
false
127136
)
128137

129138
let prompt_with_context:
@@ -149,6 +158,7 @@ export const get_prompt_data = async (params: {
149158
return {
150159
repository: params.repository,
151160
was_empty_stage,
161+
prompt_diffs_only,
152162
prompt_without_context,
153163
prompt_with_context,
154164
setting,

0 commit comments

Comments
 (0)