feat(web): purpose-built tool cards for Forgejo write tools #5
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/t-68"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The nine Forgejo write tools (
forgejo_create_pr,forgejo_update_pr,forgejo_create_pr_comment,forgejo_post_review,forgejo_create_issue,forgejo_create_issue_comment,forgejo_update_issue_description,forgejo_update_issue_labels,forgejo_close_issue) now attach a typeddetailspayload to successful results (packages/protocol/src/forgejo-tools.ts). The model-visible text is unchanged apart from a, draftsuffix on draft PRs. Each card now shows bodies as rendered markdown in a collapsed section, lists a review's inline comments, and ends with a structured result line whose PR/issue/comment/review refs link to Forgejo (html_url, new tab). Results without details (sessions recorded before this change) fall back to the result text with clickable URLs.forgejo_create_prgains adraftflag: it prefixes the title withWIP:unless a WIP prefix is already there, and reports the draft state from Forgejo's response.Decisions
forgejo_create_pr_thread_commentis a write tool but was not one of the nine. Its card keeps the text result; only its body preview moved from raw monospace to the new collapsed markdown section, so the oldBodyPreviewhelper could be deleted.forgejo/ui.tsx, each used across several views:stringArray(reads string-array args defensively),isStringArrayandisForgejoUrl(details type guards).LabelTags(renders labels as tags) lives there too, because both create views use it.ForgejoTool.tsx, read-tool cases keep their existing running/partial result logic. Write views get theGitTool-stylerunning | ok | errorstate, plus details only onok.Verification
bun run typecheck: protocol, server and web all exit 0.cd apps/server && bun test src/forgejo: 143 pass, 0 fail, including the newdraftTitlecases and the unchangedtextResult("hi")shape test.draft: truesends the titleWIP: x; an existing[WIP]prefix is not doubled.draftvalue.#fragmentstripped.noop: truewith the current names.close_issuewithout a comment gives a null comment id and URL.detailskey.