···136136 include_filetype = true,
137137 insert_as_comment = true,
138138 }
139139+ },
140140+ {
141141+ "ThePrimeagen/99",
142142+ config = function()
143143+ local _99 = require("99")
144144+145145+ -- For logging that is to a file if you wish to trace through requests
146146+ -- for reporting bugs, i would not rely on this, but instead the provided
147147+ -- logging mechanisms within 99. This is for more debugging purposes
148148+ local cwd = vim.uv.cwd()
149149+ local basename = vim.fs.basename(cwd)
150150+ _99.setup({
151151+ logger = {
152152+ level = _99.DEBUG,
153153+ path = "/tmp/" .. basename .. ".99.debug",
154154+ print_on_error = true,
155155+ },
156156+157157+ --- A new feature that is centered around tags
158158+ completion = {
159159+ --- Defaults to .cursor/rules
160160+ cursor_rules = "<custom path to cursor rules>"
161161+162162+ --- A list of folders where you have your own agents
163163+ custom_rules = {
164164+ "scratch/custom_rules/",
165165+ },
166166+167167+ --- What autocomplete do you use. We currently only
168168+ --- support cmp right now
169169+ source = "cmp",
170170+171171+ }
172172+173173+ --- WARNING: if you change cwd then this is likely broken
174174+ --- ill likely fix this in a later change
175175+ ---
176176+ --- md_files is a list of files to look for and auto add based on the location
177177+ --- of the originating request. That means if you are at /foo/bar/baz.lua
178178+ --- the system will automagically look for:
179179+ --- /foo/bar/AGENT.md
180180+ --- /foo/AGENT.md
181181+ --- assuming that /foo is project root (based on cwd)
182182+ md_files = {
183183+ "AGENT.md",
184184+ },
185185+ })
186186+187187+ -- Create your own short cuts for the different types of actions
188188+ vim.keymap.set("n", "<leader>9f", function()
189189+ _99.fill_in_function()
190190+ end)
191191+ -- take extra note that i have visual selection only in v mode
192192+ -- technically whatever your last visual selection is, will be used
193193+ -- so i have this set to visual mode so i dont screw up and use an
194194+ -- old visual selection
195195+ --
196196+ -- likely ill add a mode check and assert on required visual mode
197197+ -- so just prepare for it now
198198+ vim.keymap.set("v", "<leader>9v", function()
199199+ _99.visual()
200200+ end)
201201+202202+ --- if you have a request you dont want to make any changes, just cancel it
203203+ vim.keymap.set("v", "<leader>9s", function()
204204+ _99.stop_all_requests()
205205+ end)
206206+207207+ --- Example: Using rules + actions for custom behaviors
208208+ --- Create a rule file like ~/.rules/debug.md that defines custom behavior.
209209+ --- For instance, a "debug" rule could automatically add printf statements
210210+ --- throughout a function to help debug its execution flow.
211211+ vim.keymap.set("n", "<leader>9fd", function()
212212+ _99.fill_in_function()
213213+ end)
214214+ end,
139215 }
140216}