Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hammerspoon/Spoons/ClaudeRewriter.spoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ obj.license = "MIT - https://opensource.org/licenses/MIT"
obj.apiKey = nil
obj.model = "claude-sonnet-4-5"
obj.systemPrompt =
"Rewrite the following text for clarity and correct grammar. Preserve the original tone, intent, and meaning. Return ONLY the rewritten text with no preamble or explanation. DONT use emdashes."
"Rewrite the following text for clarity and correct grammar. Preserve the original tone, intent, and meaning. Return ONLY the rewritten text with no preamble or explanation. DONT use emdashes. Use emojies to express gratitude, but avoid face emojies, only symbols."
obj.alertDuration = 1.5

local API_URL = "https://api.anthropic.com/v1/messages"
Expand Down
6 changes: 5 additions & 1 deletion hammerspoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ end)

hs.loadSpoon("ClaudeRewriter")

spoon.ClaudeRewriter.apiKey = os.getenv("ANTHROPIC_API_KEY")
local f = io.open(os.getenv("HOME") .. "/.config/gitlab-duo/a-key", "r")
if f then
spoon.ClaudeRewriter.apiKey = f:read("*l")
f:close()
end

spoon.ClaudeRewriter:bindHotkeys({
rewrite = { { "alt" }, "c" },
Expand Down
Loading