From 92e8c7f554c5b9ae558e48c31a9f11c05209fda9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Mar 2026 23:58:16 +0000 Subject: [PATCH] Reorder tools panel: description first, then parameters, then system message In the Tools Used section, the tool summary line now shows the function description (e.g. "ls - List files and folders...") instead of the system message prefix. The expanded details now display sections in order: Function Description, Parameters, System Message, Example Arguments. Bump version to 0.13.0. https://claude.ai/code/session_01TpUAy6hJa6WfNxiFuNxcfR --- Cargo.toml | 2 +- README.md | 8 ++-- pyproject.toml | 2 +- python/continue_transcripts/__init__.py | 2 +- src/main.rs | 60 ++++++++++++++++--------- 5 files changed, 47 insertions(+), 27 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5ae6a48..c195097 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "continue-transcripts" -version = "0.12.0" +version = "0.13.0" edition = "2021" description = "Convert continue.dev session files to readable HTML transcripts" license = "MIT" diff --git a/README.md b/README.md index 15db186..b90377c 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Install globally so the `continue-transcripts` command is always available: ```sh uv tool install continue-transcripts \ --no-index \ - --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.12.0 + --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.13.0 ``` The `continue-transcripts` command is then available on your `PATH`. @@ -83,7 +83,7 @@ To upgrade later (update the version in the URL): ```sh uv tool install --upgrade continue-transcripts \ --no-index \ - --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.12.0 + --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.13.0 ``` To uninstall: @@ -100,7 +100,7 @@ Run without installing: uvx \ --no-index \ --from continue-transcripts \ - --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.12.0 \ + --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.13.0 \ continue-transcripts ./sessions ``` @@ -115,7 +115,7 @@ uv venv .venv source .venv/bin/activate uv pip install continue-transcripts \ --no-index \ - --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.12.0 + --find-links https://github.com/curtisalexander/continue-transcripts/releases/expanded_assets/v0.13.0 ``` ### Building from source diff --git a/pyproject.toml b/pyproject.toml index f5c19ad..5f875e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "continue-transcripts" -version = "0.12.0" +version = "0.13.0" description = "Convert continue.dev session files to readable HTML transcripts" readme = "README.md" license = { text = "MIT" } diff --git a/python/continue_transcripts/__init__.py b/python/continue_transcripts/__init__.py index 3a98548..3fcfefa 100644 --- a/python/continue_transcripts/__init__.py +++ b/python/continue_transcripts/__init__.py @@ -1,3 +1,3 @@ """continue-transcripts - Convert continue.dev session files to readable HTML transcripts.""" -__version__ = "0.12.0" +__version__ = "0.13.0" diff --git a/src/main.rs b/src/main.rs index 8421077..337e03c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1402,11 +1402,11 @@ fn render_tools_reference_from_defs( " {}", encode_text(name) )); - // Short description: prefer systemMessageDescription.prefix, else first line of description - let short = if !tool.system_message_prefix.is_empty() { - &tool.system_message_prefix - } else if !tool.description.is_empty() { + // Short description: prefer function description, else systemMessageDescription.prefix + let short = if !tool.description.is_empty() { tool.description.lines().next().unwrap_or("") + } else if !tool.system_message_prefix.is_empty() { + &tool.system_message_prefix } else { "" }; @@ -1433,24 +1433,29 @@ fn render_tools_reference_from_defs( html.push_str("\n"); html.push_str("
\n"); - // System message description (the instruction in the system prompt) - if !tool.system_message_prefix.is_empty() { + // Function description (from function.description in the tool schema) + if !tool.description.is_empty() { html.push_str("
\n"); - html.push_str("
System Message
\n"); + html.push_str("
Function Description
\n"); html.push_str(&format!( - "

{}

\n", - encode_text(&tool.system_message_prefix) + " {}\n", + markdown_to_html(&tool.description) )); html.push_str("
\n"); } - // Function description (from function.description in the tool schema) - if !tool.description.is_empty() { + // Parameters from JSON Schema + if let Some(params) = &tool.parameters { + html.push_str(&render_parameters_schema(params)); + } + + // System message description (the instruction in the system prompt) + if !tool.system_message_prefix.is_empty() { html.push_str("
\n"); - html.push_str("
Function Description
\n"); + html.push_str("
System Message
\n"); html.push_str(&format!( - " {}\n", - markdown_to_html(&tool.description) + "

{}

\n", + encode_text(&tool.system_message_prefix) )); html.push_str("
\n"); } @@ -1475,11 +1480,6 @@ fn render_tools_reference_from_defs( } } - // Parameters from JSON Schema - if let Some(params) = &tool.parameters { - html.push_str(&render_parameters_schema(params)); - } - html.push_str("
\n"); html.push_str(" \n"); } else { @@ -5175,7 +5175,7 @@ mod tests { assert!(html.contains("command")); assert!(html.contains("file_path")); - // systemMessageDescription prefix should appear as short description + // systemMessageDescription prefix should appear in tool reference assert!(html.contains("Execute shell commands and return output")); // Tool calls should appear @@ -5186,6 +5186,26 @@ mod tests { // Model should be extracted from promptLogs assert!(html.contains("Claude 3.5 Sonnet")); + + // Tool sections should appear in order: Function Description, Parameters, System Message + // Search within the tools-reference section (after the CSS which also contains class names) + let tools_ref_start = html.find("class=\"tools-reference\"").expect("tools-reference present"); + let tools_html = &html[tools_ref_start..]; + let func_desc_pos = tools_html.find("Function Description").expect("Function Description present"); + let params_pos = tools_html.find("tool-params-header").expect("Parameters present"); + let sys_msg_pos = tools_html.find("System Message").expect("System Message present"); + assert!( + func_desc_pos < params_pos, + "Function Description should appear before Parameters" + ); + assert!( + params_pos < sys_msg_pos, + "Parameters should appear before System Message" + ); + + // Summary line should use function description, not system message prefix + // The Bash tool's function description starts with "Execute a shell command" + assert!(html.contains("Execute a shell command")); } // -----------------------------------------------------------------------