Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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:
Expand All @@ -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
```

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion python/continue_transcripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""continue-transcripts - Convert continue.dev session files to readable HTML transcripts."""

__version__ = "0.12.0"
__version__ = "0.13.0"
60 changes: 40 additions & 20 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1402,11 +1402,11 @@ fn render_tools_reference_from_defs(
" <summary class=\"tool-ref-item-summary\"><span class=\"tool-ref-name\">{}</span>",
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 {
""
};
Expand All @@ -1433,24 +1433,29 @@ fn render_tools_reference_from_defs(
html.push_str("</summary>\n");
html.push_str(" <div class=\"tool-ref-full\">\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(" <div class=\"tool-section\">\n");
html.push_str(" <div class=\"tool-section-header\">System Message</div>\n");
html.push_str(" <div class=\"tool-section-header\">Function Description</div>\n");
html.push_str(&format!(
" <p class=\"tool-system-msg\">{}</p>\n",
encode_text(&tool.system_message_prefix)
" {}\n",
markdown_to_html(&tool.description)
));
html.push_str(" </div>\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(" <div class=\"tool-section\">\n");
html.push_str(" <div class=\"tool-section-header\">Function Description</div>\n");
html.push_str(" <div class=\"tool-section-header\">System Message</div>\n");
html.push_str(&format!(
" {}\n",
markdown_to_html(&tool.description)
" <p class=\"tool-system-msg\">{}</p>\n",
encode_text(&tool.system_message_prefix)
));
html.push_str(" </div>\n");
}
Expand All @@ -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(" </div>\n");
html.push_str(" </details>\n");
} else {
Expand Down Expand Up @@ -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
Expand All @@ -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"));
}

// -----------------------------------------------------------------------
Expand Down