Skip to content

Commit f8d47ce

Browse files
committed
feat(doc): mark integrations APIs as deprecated
Add @deprecated tags to integration-related functions, directing users to use the newer CopilotChat.select_prompt interface instead. This improves API consistency and prepares for future changes.
1 parent 21ed541 commit f8d47ce

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

lua/CopilotChat/actions.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ local M = {}
99
--- User prompt actions
1010
---@param config CopilotChat.config.shared?: The chat configuration
1111
---@return CopilotChat.integrations.actions?: The prompt actions
12+
---@deprecated Use |CopilotChat.select_prompt| instead
1213
function M.prompt_actions(config)
1314
local actions = {}
1415
for name, prompt in pairs(chat.prompts()) do
@@ -25,6 +26,7 @@ end
2526
--- Pick an action from a list of actions
2627
---@param pick_actions CopilotChat.integrations.actions?: A table with the actions to pick from
2728
---@param opts table?: vim.ui.select options
29+
---@deprecated Use |CopilotChat.select_prompt| instead
2830
function M.pick(pick_actions, opts)
2931
if not pick_actions or not pick_actions.actions or vim.tbl_isempty(pick_actions.actions) then
3032
return

lua/CopilotChat/integrations/fzflua.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ local M = {}
77
--- Pick an action from a list of actions
88
---@param pick_actions CopilotChat.integrations.actions?: A table with the actions to pick from
99
---@param opts table?: fzf-lua options
10+
---@deprecated Use |CopilotChat.select_prompt| instead
1011
function M.pick(pick_actions, opts)
1112
if not pick_actions or not pick_actions.actions or vim.tbl_isempty(pick_actions.actions) then
1213
return

lua/CopilotChat/integrations/snacks.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ local M = {}
77
--- Pick an action from a list of actions
88
---@param pick_actions CopilotChat.integrations.actions?: A table with the actions to pick from
99
---@param opts table?: snacks options
10+
---@deprecated Use |CopilotChat.select_prompt| instead
1011
function M.pick(pick_actions, opts)
1112
if not pick_actions or not pick_actions.actions or vim.tbl_isempty(pick_actions.actions) then
1213
return

lua/CopilotChat/integrations/telescope.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ local M = {}
1313
--- Pick an action from a list of actions
1414
---@param pick_actions CopilotChat.integrations.actions?: A table with the actions to pick from
1515
---@param opts table?: Telescope options
16+
---@deprecated Use |CopilotChat.select_prompt| instead
1617
function M.pick(pick_actions, opts)
1718
if not pick_actions or not pick_actions.actions or vim.tbl_isempty(pick_actions.actions) then
1819
return

0 commit comments

Comments
 (0)