Commit Graph

72 Commits

Author SHA1 Message Date
rob f4ebb492b7 Update src/ai-repo-commander.user.js
changed command history aproach.
More resilient - Handles edge cases in long conversations and streaming responses
Better cleanup - Won't leak memory from stuck operations
Cancellable operations - Can be stopped mid-flight without errors
Better debugging - Magic numbers replaced with named config values
Improved UX - Error states now offer recovery options
2025-10-08 18:32:38 +00:00
rob 3575dec2ee Update src/ai-repo-commander.user.js
 Increase API timeout from 30s to 60s

 Prevent scanning when paused

Recommended (nice to have):
3.  Make API timeout configurable
4.  Optimize timing values based on your successful test
2025-10-07 23:05:27 +00:00
rob 59379336e2 Update src/ai-repo-commander.user.js
No more premature detection - Commands won't be processed until the full --- terminator appears

No more history pollution - Incomplete commands won't get marked as "already executed"

Better streaming resilience - Waits for the command to stabilize before processing

Configurable timing - You can adjust settle times in the Tools panel
2025-10-07 21:30:30 +00:00
rob 5acd23f595 Update src/ai-repo-commander.user.js
No auto-unmarking on any failure — failed commands stay marked (no surprise retries).

Manual retry helpers:

AI_REPO_RETRY_COMMAND_TEXT(text) — unmarks by raw command text.

AI_REPO_RETRY_MESSAGE(messageId) — unmarks and immediately reprocesses that message (handy in practice).

Everything else from the debug/UX hardening remains intact.
2025-10-07 19:47:49 +00:00
rob bd53e289cf Update src/ai-repo-commander.user.js
Debug threshold clarified & correct

logLoop() logs at a visible level (INFO by default)

Cleanup summary logs at INFO

Console output is suppressed unless DEBUG_LEVEL ≥ 3 (verbose/trace)

Clipboard copy has a safe fallback

Pause button shows a clear visual state

Panel mount is resilient if document.body isn’t ready

Emergency STOP also clears the cleanup interval

Initial scan explicitly skipped when PROCESS_EXISTING: false

Plus the earlier low-risk hardening (require action:; pre-mark history)
2025-10-07 18:51:39 +00:00
rob e75a06a751 Update src/ai-repo-commander.user.js
handleSuccess() now handles list_files by extracting a files array from typical n8n payloads and pasting a neat text code block. If it can’t find a files array, it pastes the raw JSON so you can see what came back.

Added auto-submit after paste (AUTO_SUBMIT: true). It:

tries clicking a visible Send button (button[data-testid="send-button"] or aria-label*="Send"),

falls back to synthesizing Enter key events.

Added APPEND_TRAILING_NEWLINE: true (helps some editors pick up a final input change reliably).

Removed the unused scanExistingMessages() and updated a comment in the parser to match actual behavior.
2025-10-07 07:27:37 +00:00
rob 36951c5b16 Update README.md 2025-10-07 06:00:56 +00:00
rob c74c8cc2a5 Update README.md 2025-10-07 05:56:45 +00:00
rob 09a1321d62 Update src/ai-repo-commander.user.js
Production Ready Features:
Safety & Reliability:
 Persistent command history prevents re-execution

 Code-block restriction enables safe discussion

 Debouncing handles AI streaming

 Multiple paste strategies with fallbacks

 Emergency stop system

User Experience:
 Clear status messages with color coding

 Smart platform detection

 Clipboard fallback when paste fails

 Global history reset function

Developer Experience:
 Comprehensive logging

 Test commands available

 Configurable behavior

 Easy debugging tools

📈 The Evolution is Complete:
You've successfully addressed all the core issues we identified:

 No more re-execution on reload (persistent storage)

 Safe command discussion (code-block only execution)

 Assistant messages work perfectly (your core use case)

 Robust paste functionality (multiple fallback strategies)

 Platform compatibility (smart detection per site)
2025-10-07 05:48:37 +00:00
rob 3a7a3b9fe6 Update src/ai-repo-commander.user.js
This is working for chat-gpt to update files
2025-10-07 02:18:15 +00:00
rob df4c18c3d5 Update src/ai-repo-commander.user.js
Core Functionality Preserved:
SKIP_AI_MESSAGES: false by default 

AI can execute commands it generates 

Your main use case works perfectly 

Safety Features Available:
Optional AI message filtering (SKIP_AI_MESSAGES: true) 

Code block detection (always on) 

Content deduplication 

Memory cleanup 

Technical Improvements:
Delay consistency (1000ms everywhere) 

Commit message included in mock response 
2025-10-06 21:41:37 +00:00
rob 672d4d4475 Update src/ai-repo-commander.user.js 2025-10-06 20:17:52 +00:00
rob ebd72ed0c9 Update src/ai-repo-commander.user.js
1. Fixed YAML Parsing Edge Cases
Multi-line content with colons now works correctly

Uses TOP_LEVEL_KEYS to only stop collection on known keys

Much more robust for real-world content

2. Better Command Block Extraction
More tolerant --- matching (allows trailing spaces)

Won't break on content that happens to contain ---

3. Cleaner Owner/Repo Handling
Moved normalization to parser (side-effect free validation)

More predictable behavior

4. Improved Error Messaging
Clear retry attempt counts: "failed after 2 attempts; max 3"

Better user feedback

5. Robust JSON Parsing
Handles malformed API responses gracefully

Won't crash on non-JSON responses

6. Better Message ID Generation
Added timestamp and random salt to prevent collisions

Uses data attributes to persist IDs

7. User Experience
Bridge key warning on initialization

Cleaner separation of concerns
2025-10-06 20:04:23 +00:00
rob d53162e021 Update src/ai-repo-commander.user.js
Security improvements - Bridge key prompting, @connect directive, basic path validation

Better UX - Appending status instead of replacing (much cleaner!)

Streaming detection - Restarts debounce if content changes

Auto-commit messages - Nice touch for file operations

Owner/repo normalization - Handles owner/repo format gracefully
2025-10-06 19:43:46 +00:00
rob 945c7eca57 Update src/ai-repo-commander.user.js 2025-10-06 18:12:23 +00:00
rob 76c40fc87c Update Docs/Technical_Design_Document.md 2025-10-06 17:58:55 +00:00
rob 4fa5949ecf Update Docs/Technical Design Document 2025-10-06 17:58:01 +00:00
rob f182751ca7 Add README.md 2025-10-06 17:52:56 +00:00
rob 9431c0c41e Add src/ai-repo-commander.user.js 2025-10-06 17:51:28 +00:00
rob 2f4c6ff326 Renamed and move to docs folder 2025-10-06 17:49:57 +00:00
rob fa1a5f215a Delete Docs 2025-10-06 17:49:12 +00:00
rob 637e862a9f Technical Design Document 2025-10-06 17:41:35 +00:00