R-Kentaren commited on
Commit
0df4996
Β·
verified Β·
1 Parent(s): deb600f

fix: agent_run param mismatch (send agent_name) + add GitHub push-update (3 inputs: repo name, token, username; --force-with-lease)

Browse files

Fixes agent_run + adds GitHub push-update:

FIX: handle_agent_run param mismatch
- Backend declared 8 params (prompt, target_language, target_framework,
history_json, skills_json, search_enabled, image_url, agent_name)
but frontend POST body only sent 7 β€” Gradio raised
'needed: 8, got: 7'. Frontend now sends state.activeAgent as the
8th value, restoring agent_run for ALL prompts (the bug broke agent
mode entirely after the Custom Agents feature shipped).

FEAT: Push Update to GitHub (3 inputs only)
- New backend: code/tools/github.py::push_to_github(repo_name,
github_token, username, branch?, commit_message?, timeout?)
- Workflow: snapshot workspace β†’ fresh git repo in temp dir β†’
git add -A + git commit β†’ git push --force-with-lease
https://<user>:<token>@github.com/<owner>/<repo>.git <branch>.
- Falls back to plain push if --force-with-lease fails on a brand-new
empty repo (no refs to lease against).
- Token is scrubbed from error messages before being returned.
- New API: push_github(repo_name, github_token, username, ...)
- New UI: 'Push Update to GitHub' section in the Deploy tab with 3
required inputs (repo name, GitHub token, username) + an Advanced
<details> for branch/commit_message.
- Updated README.md and CLAUDE.md with new feature docs.

Files changed (1) hide show
  1. index.html +4 -3
index.html CHANGED
@@ -675,9 +675,11 @@ body.hide-thinking .think-block { display: none; }
675
  /* Agent tab β€” scrollable like the Deploy tab.
676
  Override .tab-pane.active's `display:flex` so the single .deploy-section
677
  child does not get squished by flex shrink, which was preventing the
678
- pane from scrolling. */
 
 
 
679
  #pane-agent {
680
- display: block !important;
681
  padding: 16px;
682
  overflow-y: auto;
683
  overflow-x: hidden;
@@ -871,7 +873,6 @@ body.hide-thinking .think-block { display: none; }
871
  DEPLOY TAB
872
  ═══════════════════════════════════════════════════════ */
873
  #pane-deploy {
874
- display: block !important;
875
  padding: 16px;
876
  overflow-y: auto;
877
  overflow-x: hidden;
 
675
  /* Agent tab β€” scrollable like the Deploy tab.
676
  Override .tab-pane.active's `display:flex` so the single .deploy-section
677
  child does not get squished by flex shrink, which was preventing the
678
+ pane from scrolling.
679
+ NOTE: `display:none` is inherited from `.tab-pane` (base); only the
680
+ `.active` state flips to `display:block`. Don't put `display:block` on
681
+ the base `#pane-agent` or both panes will render at the same time. */
682
  #pane-agent {
 
683
  padding: 16px;
684
  overflow-y: auto;
685
  overflow-x: hidden;
 
873
  DEPLOY TAB
874
  ═══════════════════════════════════════════════════════ */
875
  #pane-deploy {
 
876
  padding: 16px;
877
  overflow-y: auto;
878
  overflow-x: hidden;