Skip to content

Commit

Permalink
docs: add config retrieval example to README
Browse files Browse the repository at this point in the history
Add example showing how to access the current chat configuration and print
the model name, helping users understand how to retrieve configuration
values at runtime.
  • Loading branch information
deathbeam committed Dec 1, 2024
1 parent ba81962 commit f8942da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ local prompts = chat.prompts()
-- Get last copilot response (also can be used for integrations and custom keymaps)
local response = chat.response()

-- Retrieve current chat config
local config = chat.config
print(config.model)

-- Pick a prompt using vim.ui.select
local actions = require("CopilotChat.actions")

Expand Down

0 comments on commit f8942da

Please sign in to comment.