@@ -16,7 +16,7 @@ import {
1616import path from "path"
1717import { stat } from "fs/promises"
1818import { fileURLToPath } from "url"
19- import type { AutocompleteSource , Layout , Page , ToolRender } from "@opencode/plugin/tui/context"
19+ import type { AutocompleteSource , Layout , Page } from "@opencode/plugin/tui/context"
2020import { Host } from "@opencode/plugin/host"
2121import { resolveSlots , type Claim } from "./structure"
2222import { createStore , produce , reconcile as reconcileStore , unwrap } from "solid-js/store"
@@ -71,8 +71,6 @@ type Value = {
7171 readonly markdown : ( ) => MarkdownOptions [ "renderNode" ]
7272 /** Layout knobs merged across active plugins; later-enabled plugins win per field. */
7373 readonly layout : ( ) => Layout
74- /** The renderer for one canonical tool name; the last-enabled active plugin that registered one wins. */
75- readonly tool : ( name : string ) => { readonly plugin : string ; readonly render : ToolRender } | undefined
7674 /** Composer popups by trigger character; the last-enabled active plugin that claimed one wins. */
7775 readonly autocomplete : ( ) => ReadonlyMap < string , AutocompleteSource >
7876 readonly activate : ( id : string ) => Promise < boolean >
@@ -90,7 +88,6 @@ type Registration = {
9088 slots : Record < string , RegisteredSlot >
9189 markdown : Record < string , MarkdownCodeBlockRenderer >
9290 layout : Record < string , Layout >
93- tools : Record < string , ToolRender >
9491 autocomplete : Record < string , AutocompleteSource >
9592 cleanups : Dispose [ ]
9693}
@@ -162,7 +159,6 @@ export function PluginProvider(props: ParentProps<{ packages: PackageSource; dir
162159 setStore ( "registrations" , id , "slots" , reconcileStore ( { } ) )
163160 setStore ( "registrations" , id , "markdown" , reconcileStore ( { } ) )
164161 setStore ( "registrations" , id , "layout" , reconcileStore ( { } ) )
165- setStore ( "registrations" , id , "tools" , reconcileStore ( { } ) )
166162 setStore ( "registrations" , id , "autocomplete" , reconcileStore ( { } ) )
167163 }
168164 // Registration-store key order is enable order, so later items win.
@@ -179,14 +175,6 @@ export function PluginProvider(props: ParentProps<{ packages: PackageSource; dir
179175 { } ,
180176 ) ,
181177 )
182- const tools = createMemo ( ( ) => {
183- const result = new Map < string , { plugin : string ; render : ToolRender } > ( )
184- for ( const [ plugin , registration ] of Object . entries ( store . registrations ) ) {
185- if ( ! registration . active ) continue
186- for ( const [ name , render ] of Object . entries ( registration . tools ) ) result . set ( name , { plugin, render } )
187- }
188- return result
189- } )
190178 const autocomplete = createMemo ( ( ) => {
191179 const result = new Map < string , AutocompleteSource > ( )
192180 for ( const registration of Object . values ( store . registrations ) ) {
@@ -215,7 +203,7 @@ export function PluginProvider(props: ParentProps<{ packages: PackageSource; dir
215203 set : (
216204 kind : RegistryKind ,
217205 name : string ,
218- value : Page | RegisteredSlot | MarkdownCodeBlockRenderer | Layout | ToolRender | AutocompleteSource ,
206+ value : Page | RegisteredSlot | MarkdownCodeBlockRenderer | Layout | AutocompleteSource ,
219207 ) => setStore ( "registrations" , id , kind , name , ( ) => value ) ,
220208 remove : ( kind , name ) =>
221209 setStore (
@@ -658,7 +646,6 @@ export function PluginProvider(props: ParentProps<{ packages: PackageSource; dir
658646 slots : { register : registerSlot , resolved } ,
659647 markdown,
660648 layout,
661- tool : ( name ) => tools ( ) . get ( name ) ,
662649 autocomplete,
663650 // Manual dialog toggles join the same chain as reconciles so a
664651 // toggle mid-reload cannot mix registrations across generations.
@@ -761,7 +748,6 @@ function toRegistration(item: Desired): Registration {
761748 slots : { } ,
762749 markdown : { } ,
763750 layout : { } ,
764- tools : { } ,
765751 autocomplete : { } ,
766752 cleanups : [ ] ,
767753 }
0 commit comments