fix: default clear=true on kitt_display — replace content by default instead of appending
This commit is contained in:
@@ -116,7 +116,7 @@ class KittWorkbenchServer:
|
||||
|
||||
async def kitt_display(self, project: str, widget: str, content: str = "",
|
||||
items: str = "", id: str = "", label: str = "",
|
||||
placeholder: str = "", pane: str = "main", clear: bool = False) -> str:
|
||||
placeholder: str = "", pane: str = "main", clear: bool = True) -> str:
|
||||
if project not in self._connections:
|
||||
return json.dumps({"error": f"Project '{project}' not open. Call kitt_open first."})
|
||||
cmd = DisplayCmd(
|
||||
@@ -216,8 +216,8 @@ def create_mcp_server(workbench_dir: Path = DEFAULT_WORKBENCH_DIR, socket_dir: s
|
||||
@mcp.tool()
|
||||
async def kitt_display(project: str, widget: str, content: str = "", items: str = "",
|
||||
id: str = "", label: str = "", placeholder: str = "",
|
||||
pane: str = "main", clear: bool = False) -> str:
|
||||
"""Push content to the display pane. Widget types: 'markdown' (rendered text), 'table' (columns+rows as JSON in content), 'checklist' (items as JSON array), 'button' (needs id+label), 'input' (text field — needs id+placeholder, user must press Enter to submit). Tell the user to press Enter to submit text inputs. Use kitt_events to read user interactions."""
|
||||
pane: str = "main", clear: bool = True) -> str:
|
||||
"""Push content to the display pane. Clears the target pane first by default (set clear=false to append instead). Widget types: 'markdown' (rendered text), 'table' (columns+rows as JSON in content), 'checklist' (items as JSON array), 'button' (needs id+label), 'input' (text field — needs id+placeholder, user must press Enter to submit). Tell the user to press Enter to submit text inputs. Use kitt_events to read user interactions."""
|
||||
return await srv.kitt_display(project, widget, content, items, id, label, placeholder, pane, clear)
|
||||
|
||||
@mcp.tool()
|
||||
|
||||
Reference in New Issue
Block a user