Skip to content

vertexE/chat-context-ui.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat-context-ui.nvim

chat-context-ui is a UX wrapper around your favorite AI agent.

  • generate code in line
  • ask questions
  • fine grained management of context (code blocks, urls, filetree, selection, lsp, etc...)

Caution

plugin still in a "draft" state and not ready for use, expect bugs and no documentation! I will continue to flush out the design and usage.

Install

If you were to install and wrap CopilotChat.nvim, you could do something like the following

    {
        "josiahdenton/chat-context-ui.nvim",
        dependencies = {
            "CopilotC-Nvim/CopilotChat.nvim",
        },
        keys = {
            {
                "<leader>ai",
                function()
                    require("chat-context-ui").open()
                end,
                mode = { "n" },
                desc = "open AI actions panel",
            },
        },
        --- @type ccc.PluginOpts
        opts = {
            ui = {
                layout = "split",
            },
            agent = {
                callback = function(prompt, resolve)
                    require("CopilotChat").ask(prompt, {
                        headless = true,
                        callback = function(response)
                            resolve(response)
                        end,
                    })
                end,
            },
        },
    },

Demo

With the assistant panel, you can do any of the following...

  • action: interact with copilot to create a response or manage context state
  • context: toggle additional info for copilot to use
demo_agent_ui.mov

Next Steps

  • inline prompting using virtual text?
    • open hidden buf and hide cursor
    • type out what you want?
  • possibly add diffs to better compare proposed changes? could make this an option you enable...
  • build repo context map to allow copilot to fetch more info (such as function definitions, class declarations, etc)
  • build out feedback loop + quick actions

IDEA: Feedback loop + Quick actions

  • give constant feedback every N seconds
  • suggest quick actions (tries to come up with prompt)
  • if you select a quick action, it will start working --> it will have to select that range and modify that range

About

a fine grained approach to managing copilot chat context

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages