Skip to content

Commit 812d1bb

Browse files
authored
chore: inline tool descriptions, remove separate .txt files (#18303)
1 parent 9a58c43 commit 812d1bb

File tree

5 files changed

+21
-25
lines changed

5 files changed

+21
-25
lines changed

.opencode/.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
plans/
2-
bun.lock
1+
node_modules
2+
plans
33
package.json
4-
package-lock.json
4+
bun.lock
5+
.gitignore
6+
package-lock.json

.opencode/tool/github-pr-search.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/// <reference path="../env.d.ts" />
22
import { tool } from "@opencode-ai/plugin"
3-
import DESCRIPTION from "./github-pr-search.txt"
4-
53
async function githubFetch(endpoint: string, options: RequestInit = {}) {
64
const response = await fetch(`https://api.github.com${endpoint}`, {
75
...options,
@@ -24,7 +22,16 @@ interface PR {
2422
}
2523

2624
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.`,
2835
args: {
2936
query: tool.schema.string().describe("Search query for PR titles and descriptions"),
3037
limit: tool.schema.number().describe("Maximum number of results to return").default(10),

.opencode/tool/github-pr-search.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

.opencode/tool/github-triage.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/// <reference path="../env.d.ts" />
22
import { tool } from "@opencode-ai/plugin"
3-
import DESCRIPTION from "./github-triage.txt"
4-
53
const TEAM = {
64
desktop: ["adamdotdevin", "iamdavidhill", "Brendonovich", "nexxeln"],
75
zen: ["fwang", "MrMushrooooom"],
@@ -40,7 +38,12 @@ async function githubFetch(endpoint: string, options: RequestInit = {}) {
4038
}
4139

4240
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.`,
4447
args: {
4548
assignee: tool.schema
4649
.enum(ASSIGNEES as [string, ...string[]])

.opencode/tool/github-triage.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)