diff options
| author | codegirl007 <s.raide@gmail.com> | 2026-02-08 18:04:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-08 18:04:32 -0800 |
| commit | e4050fe6164765202814b353db43da75c1947af6 (patch) | |
| tree | 8e9fe8b195edcde1d3b37134be672655d169f5e1 /lua/99/request-context.lua | |
| parent | 17be2bff90a22d8bafc102e3ca1730bb05026841 (diff) | |
| parent | 76acc1d15d8a2161d43b60ee8c5d49c1a5885c60 (diff) | |
| download | a4-e4050fe6164765202814b353db43da75c1947af6.tar.xz a4-e4050fe6164765202814b353db43da75c1947af6.zip | |
Merge branch 'master' into back-that-hash-up
Diffstat (limited to 'lua/99/request-context.lua')
| -rw-r--r-- | lua/99/request-context.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/99/request-context.lua b/lua/99/request-context.lua index 358cdd2..6671cab 100644 --- a/lua/99/request-context.lua +++ b/lua/99/request-context.lua @@ -136,6 +136,13 @@ end --- @param prompt string function RequestContext:save_prompt(prompt) local prompt_file = self.tmp_file .. "-prompt" + + local dir = vim.fs.dirname(prompt_file) + + if dir and not vim.uv.fs_stat(dir) then + pcall(vim.uv.fs_mkdir, dir, 493) + end + local file = io.open(prompt_file, "w") if file then file:write(prompt) |
