From dce4c93cff404b759bb5eb0f7ded2336b81312a7 Mon Sep 17 00:00:00 2001 From: Mortdecai Date: Sun, 29 Mar 2026 22:35:14 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20default=20clear=3Dtrue=20on=20kitt=5Fdis?= =?UTF-8?q?play=20=E2=80=94=20replace=20content=20by=20default=20instead?= =?UTF-8?q?=20of=20appending?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kitty_workbench/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kitty_workbench/server.py b/src/kitty_workbench/server.py index f0b1a23..a692543 100644 --- a/src/kitty_workbench/server.py +++ b/src/kitty_workbench/server.py @@ -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()