11<script setup lang="ts">
22import type { AgentManifest , InvokeResult } from ' @devframes/plugin-inspect/client'
3- import { ref , reactive } from ' vue'
3+ import { reactive , ref } from ' vue'
44import JsonView from ' ./JsonView.vue'
55
6- const props = defineProps <{
6+ defineProps <{
77 manifest: AgentManifest | null
88 isStatic: boolean
99 results: Record <string , InvokeResult | { ok: false , error: { name: string , message: string } }>
@@ -30,7 +30,8 @@ function invokeTool(id: string) {
3030 try {
3131 const raw = JSON .parse (argsInput [id ] || ' {}' )
3232 parsed = raw
33- } catch (err ) {
33+ }
34+ catch (err ) {
3435 // Emitting error would be cleaner, for now we will throw to stop execution
3536 throw new Error (` Invalid JSON args: ${(err as Error ).message } ` )
3637 }
@@ -73,27 +74,35 @@ function readResource(id: string) {
7374 </div >
7475 <template v-if =" expanded === tool .id " >
7576 <template v-if =" tool .inputSchema " >
76- <div class =" label" >Input schema</div >
77+ <div class =" label" >
78+ Input schema
79+ </div >
7780 <JsonView :value =" tool .inputSchema " :expand-depth =" 1 " />
7881 </template >
7982 <template v-if =" tool .outputSchema " >
80- <div class =" label" >Output schema</div >
83+ <div class =" label" >
84+ Output schema
85+ </div >
8186 <JsonView :value =" tool .outputSchema " :expand-depth =" 1 " />
8287 </template >
8388 <template v-if =" tool .examples && tool .examples .length " >
84- <div class =" label" >Examples</div >
89+ <div class =" label" >
90+ Examples
91+ </div >
8592 <JsonView :value =" tool .examples " :expand-depth =" 1 " />
8693 </template >
8794
88- <div class =" label" >Invoke (MCP format)</div >
95+ <div class =" label" >
96+ Invoke (MCP format)
97+ </div >
8998 <textarea v-model =" argsInput[tool.id]" class =" args" spellcheck =" false" placeholder =" {}" />
9099 <div style =" margin-top : 8px ; display : flex ; gap : 8px ; align-items : center ;" >
91100 <button class =" btn" :disabled =" pending[tool.id] || isStatic" @click =" invokeTool(tool.id)" >
92101 {{ pending[tool.id] ? 'Invoking…' : 'Invoke' }}
93102 </button >
94103 <span v-if =" isStatic" class =" note" >read-only static backend</span >
95104 </div >
96-
105+
97106 <div v-if =" results[tool.id]" class =" result" >
98107 <div class =" result-head" >
99108 <span v-if =" results[tool.id].ok" class =" ok" >✓ resolved</span >
@@ -138,7 +147,7 @@ function readResource(id: string) {
138147 </button >
139148 <span v-if =" isStatic" class =" note" >read-only static backend</span >
140149 </div >
141-
150+
142151 <div v-if =" results[res.id]" class =" result" >
143152 <div class =" result-head" >
144153 <span v-if =" results[res.id].ok" class =" ok" >✓ resolved</span >
0 commit comments