@@ -2141,54 +2141,6 @@ class TerminationConfirmation(BaseModel):
21412141 f"Proceeding with termination of virtual workspace: { validated_workspace_id } "
21422142 )
21432143
2144- class TerminationConfirmation (BaseModel ):
2145- """Schema for collecting organization selection."""
2146-
2147- confirm : bool = Field (
2148- description = "Do you really want to terminate this virtual workspace?" ,
2149- default = False ,
2150- )
2151-
2152- result = await ctx .elicit (
2153- message = f"⚠️ **WARNING**: You are about to terminate the virtual workspace '{ workspace_name } '.\n \n "
2154- "This action is permanent and cannot be undone. All data in the workspace will be lost.\n \n "
2155- "Do you want to proceed with the termination?" ,
2156- schema = TerminationConfirmation ,
2157- )
2158-
2159- # Skip confirmation if elicitation is not supported
2160- if error == ElicitationError .NOT_SUPPORTED :
2161- await ctx .info (
2162- "Proceeding with termination without confirmation since interactive confirmation is not supported."
2163- )
2164- else :
2165- # Only check confirmation if elicitation was supported
2166- if not (
2167- elicit_result .status == "success"
2168- and elicit_result .data
2169- and elicit_result .data .confirm
2170- ):
2171- return {
2172- "status" : "cancelled" ,
2173- "message" : "Workspace termination was cancelled by the user" ,
2174- "workspace_id" : validated_workspace_id ,
2175- "workspace_name" : workspace_name ,
2176- }
2177-
2178- # Track analytics event
2179- settings .analytics_manager .track_event (
2180- user_id ,
2181- "tool_calling" ,
2182- {
2183- "name" : "terminate_virtual_workspace" ,
2184- "workspace_id" : validated_workspace_id ,
2185- },
2186- )
2187-
2188- await ctx .info (
2189- f"Proceeding with termination of virtual workspace: { validated_workspace_id } "
2190- )
2191-
21922144 # Terminate the virtual workspace
21932145 build_request (
21942146 "DELETE" , f"sharedtier/virtualWorkspaces/{ validated_workspace_id } "
0 commit comments