diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-08 17:16:29 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-08 17:16:29 -0500 |
| commit | a55a5248bd2dae5f849476d0f7b5dcd8d91cf929 (patch) | |
| tree | 834a7b012f6823b53ee2f516384b7bc4c4ec819b /modules/ai-config.el | |
| parent | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (diff) | |
fit and finish work
- gptel: added gptel-send-region with global keybinding
- projectile: made project-switch-actions more efficient with regexp
- prog-go: removed disabled code
- mu4e: capture template captures region if selected
- system utils: merged bury alive with other killing buffer code
- org-capture: renamed *website-clipper to org-webpage-clipper
- rg: auto switch to ripgrep-results window when ripgrep search completes
- dashboard: remove dashboard banner custom face
General
- moved abbrev_defs to assets
- removed gitmodules file
- updated packages
- fixed docstring and formatting throughout
Custom-Functions
- move cj/merge-list-to-list to custom-functions
- add remove leading trailing whitespace function
- corrected arrayify prompt
Font-Config
- added font point sizes in fontaine menu
- make default font point size 11
Python
- adding back python poetry support
- added cj/python-setup method
- merge python and python-mode configurations
(they are the same built-in package)
Show-Kill-Ring
- show-kill-ring displays in another read-only buffer
- show-kill-ring exits with q
Elfeed
- moved elfeed-feeds.org to assets
- removed Wired from elfeed feeds
- moved ElfeedDB to user-emacs-directory/.elfeed-db
- moved elfeed-dashboard.org to assets
Diffstat (limited to 'modules/ai-config.el')
| -rw-r--r-- | modules/ai-config.el | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/modules/ai-config.el b/modules/ai-config.el index 14380a2b..2240d0ac 100644 --- a/modules/ai-config.el +++ b/modules/ai-config.el @@ -41,11 +41,26 @@ . "You are a large language model and a careful programmer. Provide code and only code as output without any additional text, prompt or note.") (writing - . "You are a large language model and a writing assistant. Respond concisely.") + . "You are a large language model and a writing assistant. Respond + concisely.") (chat - . "You are a large language model and a conversation partner. Respond concisely."))) + . "You are a large language model and a conversation partner. Respond + concisely."))) + ;; grab the secret from ~/.authinfo.gpg (setq gptel-api-key (auth-source-pick-first-password :host "api.openai.com"))) +;; ----------------------------- Gptel Send Region ----------------------------- +;; convenience function to send a selection to Gptel. + +(defun cj/gptel-send-region (&optional prefix) + "Verify a region is selected and call gptel-send with PREFIX." + (interactive "P") + (if (use-region-p) + (gptel-send (prefix-numeric-value prefix)) + (error "No region selected"))) + +(global-set-key (kbd "C-; g") 'cj/gptel-send-region) + (provide 'ai-config) -;;; ai-config.el ends here. +;;; ai-config.el ends here |
