We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telescope example thanks to @qaptoR
local pickers = require 'telescope.pickers' local finders = require 'telescope.finders' local actions = require 'telescope.actions' local action_state = require 'telescope.actions.state' local conf = require('telescope.config').values local models = function(opts) local buf = vim.api.nvim_get_current_buf() local file_name = vim.api.nvim_buf_get_name(buf) local is_chat = require('gp').not_chat(buf, file_name) == nil opts = opts or {} pickers .new(opts, { prompt_title = 'Models', finder = finders.new_table { results = is_chat and require('gp')._chat_agents or require('gp')._command_agents, }, sorter = conf.generic_sorter(opts), attach_mappings = function(prompt_bufnr) actions.select_default:replace(function() local selection = action_state.get_selected_entry() actions.close(prompt_bufnr) require('gp').cmd.Agent { args = selection[1] } end) return true end, }) :find() end vim.keymap.set('n', '<C-g>z', function() models(require('telescope.themes').get_dropdown { winblend = 10, previewer = false, }) end, { noremap = true, silent = false, nowait = true, desc = 'GPT prompt Choose Agent', })
Originally posted by @qaptoR in #158
The text was updated successfully, but these errors were encountered:
Your snippet was inspiration for me to build telescope extension.
https://github.com/undg/telescope-gp-agent-picker.nvim
Sorry, something went wrong.
No branches or pull requests
telescope example thanks to @qaptoR
Originally posted by @qaptoR in #158
The text was updated successfully, but these errors were encountered: