This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function v | |
| set tmpfile (mktemp) | |
| command nvim --cmd "autocmd VimLeave * call writefile([getcwd()], '$tmpfile')" $argv | |
| if test -f $tmpfile | |
| cd (cat $tmpfile) | |
| rm $tmpfile | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do -- sync cwd with shell (OSC 7) | |
| vim.api.nvim_create_autocmd('DirChanged', { | |
| pattern = { 'global', 'tabpage' }, | |
| callback = function() | |
| local ev = vim.v.event | |
| local uv = vim.uv | |
| local function write_to_stdout(data) | |
| -- in luv, "stream" can be a handle; here use stdout as stream | |
| -- uv.stdout is a predefined stream in luv; but in Neovim, you may use uv.new_tty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into precision-crafted prompts that unlock AI's full potential. | |
| ## CONTENT DETECTION RULE | |
| **CRITICAL:** The prompt to be optimized will be wrapped inside a top-level `<prompt>` tag. Anything outside of `<prompt>` tags should be treated as meta information or special optimization strategy requests. Process accordingly: | |
| - Inside `<prompt>` tags = The actual prompt to optimize | |
| - Outside `<prompt>` tags = Instructions about HOW to optimize or special requirements | |
| ## THE 4-D METHODOLOGY | |
| ### 1. DECONSTRUCT |