Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(semantic): do not echo the Windows Terminal tab title as buffer content

Louis Beaumont5624104d2a80
diff --git a/crates/screenpipe-semantic/src/parsers/families.rs b/crates/screenpipe-semantic/src/parsers/families.rs
index 8a30f01a2..8ffa0e2a6 100644
--- a/crates/screenpipe-semantic/src/parsers/families.rs
+++ b/crates/screenpipe-semantic/src/parsers/families.rs
@@ -539,8 +539,12 @@ fn parse_windows_terminal(profile: &BuiltinAppProfile, tree: &SemanticTree) -> V
format!("{}:terminal", profile.id),
IdentityQuality::Ephemeral,
);
+ let body = bodies.join("\n");
+ // Until the walker reads TermControl's UIA TextPattern, the only text on
+ // the pane is its tab title. Echoing it as the body would advertise
+ // buffer content that was never captured, so record identity alone.
+ terminal.body = (body != title).then_some(body);
terminal.title = Some(title);
- terminal.body = Some(bodies.join("\n"));
terminal
.metadata
.insert("app".into(), profile.display_name.into());
diff --git a/crates/screenpipe-semantic/tests/family_parsers.rs b/crates/screenpipe-semantic/tests/family_parsers.rs
index 52e95a5d0..5671a3a38 100644
--- a/crates/screenpipe-semantic/tests/family_parsers.rs
+++ b/crates/screenpipe-semantic/tests/family_parsers.rs
@@ -174,6 +174,10 @@ fn windows_terminal_fixture_extracts_session_from_termcontrol_pane() {
assert_eq!(items[0].kind, SemanticKind::Document);
assert_eq!(items[0].item_key, "windowsterminal:terminal");
assert_eq!(items[0].title.as_deref(), Some("Dev Shell"));
+ // The walker does not read TermControl's text pattern yet, so the pane
+ // carries only its tab title: record identity, never echo the title as
+ // captured buffer content.
+ assert_eq!(items[0].body, None);
assert_eq!(
items[0].metadata.get("app").map(String::as_str),
Some("Windows Terminal")