Skip to content

Commit b7313ea

Browse files
fix(prompts): avoid %20 being treated as special sequence when relacing dirname (#1525)
* Wrap source.cwd in function tackles ticket #1524 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * CWD function handed directly #1524 Assumption that source.cwd function will not accept any arguments in the future as it currently doesn't allows simplification --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 69199d4 commit b7313ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/CopilotChat/prompts.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function M.resolve_prompt(prompt, config)
343343

344344
config.system_prompt = config.system_prompt:gsub('{OS_NAME}', vim.uv.os_uname().sysname)
345345
config.system_prompt = config.system_prompt:gsub('{LANGUAGE}', config.language)
346-
config.system_prompt = config.system_prompt:gsub('{DIR}', source.cwd())
346+
config.system_prompt = config.system_prompt:gsub('{DIR}', source.cwd)
347347
end
348348

349349
return config, prompt

0 commit comments

Comments
 (0)