diff options
| author | Stanton Burchett <sburchett@medallia.com> | 2026-08-24 12:50:32 -0600 |
|---|---|---|
| committer | Stanton Burchett <sburchett@medallia.com> | 2026-08-24 12:50:32 -0600 |
| commit | d5272ffc9d4103bf3fc2dc6e5df6cfa734582b62 (patch) | |
| tree | 9b12bedcabff57f4f7901a7cf2727293ab0b47ab /src/osc-notify-middleware.ts | |
| parent | 2660542fb713d07c53738173510fbbf52f149cc6 (diff) | |
Removing the cleanTitle function, as we have a custom title available to set.notif-click-osc-777
Diffstat (limited to 'src/osc-notify-middleware.ts')
| -rw-r--r-- | src/osc-notify-middleware.ts | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/osc-notify-middleware.ts b/src/osc-notify-middleware.ts index 6db95ec..5bd7108 100644 --- a/src/osc-notify-middleware.ts +++ b/src/osc-notify-middleware.ts @@ -4,16 +4,6 @@ import { Observable, Subject } from "rxjs"; const oscPrefix = Buffer.from("\x1b]"); const oscSuffix = Buffer.from("\x07"); -function cleanTitle(raw: string): string { - const t = (raw ?? "").trim(); - if (!t) return "Terminal"; - if (t.includes("/") || t.includes("\\")) { - const segs = t.split(/[/\\]/).filter(s => s.length > 0); - return segs.length ? segs[segs.length - 1] : t; - } - return t; -} - export default class OscNotifyMiddleware extends SessionMiddleware { getTitle: () => string; onClick: () => void; @@ -50,9 +40,9 @@ export default class OscNotifyMiddleware extends SessionMiddleware { if (oscCode === 9) { const body = oscParams.slice().join(";"); - this.showNotification(cleanTitle(this.getTitle()), body); + this.showNotification(this.getTitle(), body); } else if (oscCode === 777 && oscParams[0] === "notify") { - const title = oscParams[1] || cleanTitle(this.getTitle()); + const title = oscParams[1] || this.getTitle(); const body = oscParams.slice(2).join(";"); this.showNotification(title, body); } else { |
