mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 03:06:44 +00:00
chore: remove dead code for todoread tool (#19128)
This commit is contained in:
@@ -310,11 +310,6 @@ export function getToolInfo(tool: string, input: any = {}): ToolInfo {
|
||||
icon: "checklist",
|
||||
title: i18n.t("ui.tool.todos"),
|
||||
}
|
||||
case "todoread":
|
||||
return {
|
||||
icon: "checklist",
|
||||
title: i18n.t("ui.tool.todos.read"),
|
||||
}
|
||||
case "question":
|
||||
return {
|
||||
icon: "bubble-5",
|
||||
@@ -357,7 +352,7 @@ function sessionLink(id: string | undefined, path: string, href?: (id: string) =
|
||||
}
|
||||
|
||||
const CONTEXT_GROUP_TOOLS = new Set(["read", "glob", "grep", "list"])
|
||||
const HIDDEN_TOOLS = new Set(["todowrite", "todoread"])
|
||||
const HIDDEN_TOOLS = new Set(["todowrite"])
|
||||
|
||||
function list<T>(value: T[] | undefined | null, fallback: T[]) {
|
||||
if (Array.isArray(value)) return value
|
||||
@@ -1210,7 +1205,7 @@ PART_MAPPING["tool"] = function ToolPartDisplay(props) {
|
||||
const data = useData()
|
||||
const i18n = useI18n()
|
||||
const part = () => props.part as ToolPart
|
||||
if (part().tool === "todowrite" || part().tool === "todoread") return null
|
||||
if (part().tool === "todowrite") return null
|
||||
|
||||
const hideQuestion = createMemo(
|
||||
() => part().tool === "question" && (part().state.status === "pending" || part().state.status === "running"),
|
||||
|
||||
@@ -85,7 +85,7 @@ function list<T>(value: T[] | undefined | null, fallback: T[]) {
|
||||
return fallback
|
||||
}
|
||||
|
||||
const hidden = new Set(["todowrite", "todoread"])
|
||||
const hidden = new Set(["todowrite"])
|
||||
|
||||
function partState(part: PartType, showReasoningSummaries: boolean) {
|
||||
if (part.type === "tool") {
|
||||
|
||||
Reference in New Issue
Block a user