Skip to content

Commit

Permalink
feat: add logging to file
Browse files Browse the repository at this point in the history
  • Loading branch information
Robitx committed Jul 23, 2024
1 parent 827d5e3 commit d97120e
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 92 deletions.
5 changes: 4 additions & 1 deletion lua/gp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ local config = {
-- curl_params = { "--proxy", "http://X.X.X.X:XXXX" }
curl_params = {},

-- log file location
log_file = (os.getenv("TMPDIR") or os.getenv("TEMP") or "/tmp") .. "/gp.nvim.log",

-- directory for persisting state dynamically changed by user (like model or persona)
state_dir = vim.fn.stdpath("data"):gsub("/$", "") .. "/gp/persisted",

Expand Down Expand Up @@ -512,7 +515,7 @@ local config = {
.. "\n\nRespond exclusively with the snippet that should replace the selection above."

local agent = gp.get_command_agent()
gp.info("Implementing selection with agent: " .. agent.name)
gp.logger.info("Implementing selection with agent: " .. agent.name)

gp.Prompt(
params,
Expand Down
Loading

0 comments on commit d97120e

Please sign in to comment.