File tree Expand file tree Collapse file tree
commands/apply-context-command/sources
views/panel/backend/message-handlers/handle-hash-sign-quick-pick/symbols Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as fs from 'fs'
44import { execSync } from 'child_process'
55import { WorkspaceProvider } from '../../../context/providers/workspace/workspace-provider'
66import { LAST_CONTEXT_MERGE_REPLACE_OPTION_STATE_KEY } from '../../../constants/state-keys'
7+ import { GIT_LOG_SINCE_DURATION } from '../../../constants/values'
78import { get_git_repository } from '@/utils/git-repository-utils'
89import { Logger } from '@shared/utils/logger'
910import { dictionary } from '@shared/constants/dictionary'
@@ -24,7 +25,7 @@ export const handle_commit_files_source = async (
2425
2526 while ( true ) {
2627 const log_output = execSync (
27- ' git log --since="6 months ago " --pretty=format:"%H|%s|%ar"' ,
28+ ` git log --since="${ GIT_LOG_SINCE_DURATION } " --pretty=format:"%H|%s|%ar"` ,
2829 {
2930 cwd : repository . rootUri . fsPath ,
3031 encoding : 'utf-8'
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export const CHECKPOINT_DEFAULT_LIFESPAN = 24
22export const DEFAULT_CONTEXT_SIZE_WARNING_THRESHOLD = 60000
33export const MAX_FILE_TOKENS_FOR_COMMIT_MESSAGE = 20000
44export const MAX_PROMPT_CHARS_IN_COMMIT_MESSAGE = 1000
5+ export const GIT_LOG_SINCE_DURATION = '6 months ago'
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as vscode from 'vscode'
22import { execSync } from 'child_process'
33import { dictionary } from '@shared/constants/dictionary'
44import { LAST_SELECTED_REPOSITORY_IN_SYMBOLS_QUCK_PICK_STATE_KEY } from '@/constants/state-keys'
5+ import { GIT_LOG_SINCE_DURATION } from '@/constants/values'
56
67export const handle_commit_item = async (
78 context : vscode . ExtensionContext ,
@@ -107,7 +108,7 @@ export const handle_commit_item = async (
107108 }
108109
109110 const log_output = execSync (
110- ' git log --pretty=format:"%H%n%s%n%cr" -n 50' ,
111+ ` git log --pretty=format:"%H%n%s%n%cr" --since=" ${ GIT_LOG_SINCE_DURATION } "` ,
111112 {
112113 encoding : 'utf-8' ,
113114 cwd : selected_folder . uri . fsPath
You can’t perform that action at this time.
0 commit comments