1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-08-15 08:28:13 +02:00

update opencode

This commit is contained in:
Henrik Hautakoski 2026-08-12 13:47:02 +02:00
parent 945e4e136e
commit f20a320f08
4 changed files with 13 additions and 18 deletions

View file

@ -4,36 +4,28 @@ description: Create well-formatted commits with conventional commit messages
# Commit Command # Commit Command
You are an AI agent that helps create well-formatted git commits with conventional commit messages, follow these instructions exactly. Always run and push the commit, you don't need to ask for confirmation unless there is a big issue or error. You are an AI agent that helps create well-formatted git commits with conventional commit messages, follow these instructions exactly. Always run and NEVER push the commit, you don't need to ask for confirmation unless there is a big issue or error.
## Instructions for Agent ## Instructions for Agent
When the user runs this command, execute the following workflow: When the user runs this command, execute the following workflow:
1. **Check command mode**: 1. **Analyze git status**:
- If user provides $ARGUMENTS (a simple message), skip to step 3
2. **Run pre-commit validation**:
- Execute `pnpm lint` and report any issues
- Execute `pnpm build` and ensure it succeeds
- If either fails, ask user if they want to proceed anyway or fix issues first
3. **Analyze git status**:
- Run `git status --porcelain` to check for changes - Run `git status --porcelain` to check for changes
- If no files are staged, run `git add .` to stage all modified files - If no files are staged, run `git add .` to stage all modified files
- If files are already staged, proceed with only those files - If files are already staged, proceed with only those files
4. **Analyze the changes**: 2. **Analyze the changes**:
- Run `git diff --cached` to see what will be committed - Run `git diff --cached` to see what will be committed
- Analyze the diff to determine the primary change type (feat, fix, docs, etc.) - Analyze the diff to determine the primary change type (feat, fix, docs, etc.)
- Identify the main scope and purpose of the changes - Identify the main scope and purpose of the changes
5. **Generate commit message**: 3. **Generate commit message**:
- Create message following format: `<type>: <description>` - Create message following format: `<type>: <description>`
- Keep description concise, clear, and in imperative mood - Keep description concise, clear, and in imperative mood
- Show the proposed message to user for confirmation - Show the proposed message to user for confirmation
6. **Execute the commit**: 4. **Execute the commit**:
- Run `git commit -m "<generated message>"` - Run `git commit -m "<generated message>"`
- Display the commit hash and confirm success - Display the commit hash and confirm success
- Provide brief summary of what was committed - Provide brief summary of what was committed
@ -90,6 +82,6 @@ Example commit sequence:
- **Error handling**: If validation fails, give user option to proceed or fix issues first - **Error handling**: If validation fails, give user option to proceed or fix issues first
- **Auto-staging**: If no files are staged, automatically stage all changes with `git add .` - **Auto-staging**: If no files are staged, automatically stage all changes with `git add .`
- **File priority**: If files are already staged, only commit those specific files - **File priority**: If files are already staged, only commit those specific files
- **Always run and push the commit**: You don't need to ask for confirmation unless there is a big issue or error `git push`. - **Never push the commit**: You must never under any circumstances execute `git push`.
- **Message quality**: Ensure commit messages are clear, concise, and follow conventional format - **Message quality**: Ensure commit messages are clear, concise, and follow conventional format
- **Success feedback**: After successful commit, show commit hash and brief summary - **Success feedback**: After successful commit, show commit hash and brief summary

View file

@ -16,9 +16,9 @@
}, },
}, },
"mcp": { "mcp": {
"neuron-ai-doc": { "linear": {
"type": "remote", "type": "remote",
"url": "https://docs.neuron-ai.dev/~gitbook/mcp", "url": "https://mcp.linear.app/mcp",
"enabled": true "enabled": true
} }
} }

View file

@ -10,7 +10,7 @@ export const Notify: Plugin = async ({ $ }) => {
return { return {
async event(input) { async event(input) {
if (input.event.type === "session.idle") { if (input.event.type === "session.idle") {
await $`notify-send t 10000 "Opencode" "Your code is done!"` await $`notify-send -t 10000 "Opencode" "Your code is done!" &> /dev/null`
} }
}, },
} }

View file

@ -1,4 +1,7 @@
{ {
"$schema": "https://opencode.ai/tui.json", "$schema": "https://opencode.ai/tui.json",
"theme": "custom" "theme": "custom",
"keybinds": {
"app_exit": "<leader>q"
}
} }