GeezerVison is showing github.com — chore: inline tool descriptions, remove separate .txt files (#18303) · widomin/opencode@812d1bb
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -plans/ | 2 | | -bun.lock | | 1 | +node_modules | | 2 | +plans | 3 | 3 | package.json | 4 | | -package-lock.json | | 4 | +bun.lock | | 5 | +.gitignore | | 6 | +package-lock.json |
Collapse file Copy file name to clipboardExpand all lines: .opencode/tool/github-pr-search.ts +10-3Lines changed: 10 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /// <reference path="../env.d.ts" /> | 2 | 2 | import { tool } from "@opencode-ai/plugin" | 3 | | -import DESCRIPTION from "./github-pr-search.txt" | 4 | | - | 5 | 3 | async function githubFetch(endpoint: string, options: RequestInit = {}) { | 6 | 4 | const response = await fetch(`https://api.github.com${endpoint}`, { | 7 | 5 | ...options, | @@ -24,7 +22,16 @@ interface PR { | 24 | 22 | } | 25 | 23 |
| 26 | 24 | export default tool({ | 27 | | - description: DESCRIPTION, | | 25 | + description: `Use this tool to search GitHub pull requests by title and description. | | 26 | +
| | 27 | +This tool searches PRs in the anomalyco/opencode repository and returns LLM-friendly results including: | | 28 | +- PR number and title | | 29 | +- Author | | 30 | +- State (open/closed/merged) | | 31 | +- Labels | | 32 | +- Description snippet | | 33 | +
| | 34 | +Use the query parameter to search for keywords that might appear in PR titles or descriptions.`, | 28 | 35 | args: { | 29 | 36 | query: tool.schema.string().describe("Search query for PR titles and descriptions"), | 30 | 37 | limit: tool.schema.number().describe("Maximum number of results to return").default(10), | |
Collapse file Copy file name to clipboardExpand all lines: .opencode/tool/github-pr-search.txt -10Lines changed: 0 additions & 10 deletions Collapse file Copy file name to clipboardExpand all lines: .opencode/tool/github-triage.ts +6-3Lines changed: 6 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /// <reference path="../env.d.ts" /> | 2 | 2 | import { tool } from "@opencode-ai/plugin" | 3 | | -import DESCRIPTION from "./github-triage.txt" | 4 | | - | 5 | 3 | const TEAM = { | 6 | 4 | desktop: ["adamdotdevin", "iamdavidhill", "Brendonovich", "nexxeln"], | 7 | 5 | zen: ["fwang", "MrMushrooooom"], | @@ -40,7 +38,12 @@ async function githubFetch(endpoint: string, options: RequestInit = {}) { | 40 | 38 | } | 41 | 39 |
| 42 | 40 | export default tool({ | 43 | | - description: DESCRIPTION, | | 41 | + description: `Use this tool to assign and/or label a GitHub issue. | | 42 | +
| | 43 | +Choose labels and assignee using the current triage policy and ownership rules. | | 44 | +Pick the most fitting labels for the issue and assign one owner. | | 45 | +
| | 46 | +If unsure, choose the team/section with the most overlap with the issue and assign a member from that team at random.`, | 44 | 47 | args: { | 45 | 48 | assignee: tool.schema | 46 | 49 | .enum(ASSIGNEES as [string, ...string[]]) | |
Collapse file Copy file name to clipboardExpand all lines: .opencode/tool/github-triage.txt -6Lines changed: 0 additions & 6 deletions
|