File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,10 @@ export namespace MCP {
209209 } ,
210210 )
211211
212+ export async function reset ( ) {
213+ await state . reset ( )
214+ }
215+
212216 // Helper function to fetch prompts for a specific client
213217 async function fetchPromptsForClient ( clientName : string , client : Client ) {
214218 const prompts = await client . listPrompts ( ) . catch ( ( e ) => {
Original file line number Diff line number Diff line change @@ -119,6 +119,10 @@ export namespace Plugin {
119119 return state ( ) . then ( ( x ) => x . hooks )
120120 }
121121
122+ export async function reset ( ) {
123+ await state . reset ( )
124+ }
125+
122126 export async function init ( ) {
123127 const hooks = await state ( ) . then ( ( x ) => x . hooks )
124128 const config = await Config . get ( )
Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ import { Command } from "@/command"
66import { Config } from "@/config/config"
77import { FileWatcher } from "@/file/watcher"
88import { Flag } from "@/flag/flag"
9+ import { MCP } from "@/mcp"
10+ import { Plugin } from "@/plugin"
911import { SessionStatus } from "@/session/status"
1012import { Skill } from "@/skill"
13+ import { ToolRegistry } from "@/tool/registry"
1114import { Log } from "@/util/log"
1215import { Instance } from "./instance"
1316import z from "zod"
@@ -135,6 +138,9 @@ export namespace HotReload {
135138
136139 const reload = async ( ) => {
137140 await Config . reset ( )
141+ await Plugin . reset ( )
142+ await MCP . reset ( )
143+ await ToolRegistry . reset ( )
138144 await Skill . reset ( )
139145 await Agent . reset ( )
140146 await Command . reset ( )
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export namespace ToolRegistry {
5757 return { custom }
5858 } )
5959
60+ export async function reset ( ) {
61+ await state . reset ( )
62+ }
63+
6064 function fromPlugin ( id : string , def : ToolDefinition ) : Tool . Info {
6165 return {
6266 id,
You can’t perform that action at this time.
0 commit comments