From f707129ea52fa80d9c4e8cdef2daf536d19b0b08 Mon Sep 17 00:00:00 2001 From: quguoliang Date: Thu, 9 Jan 2025 14:45:37 +0800 Subject: [PATCH] feat: Support keyword search --- package.json | 1 + src/renderer/app.css | 1 + src/renderer/header.tsx | 20 +- src/renderer/session.tsx | 41 +- src/renderer/xterm.css | 37 + src/renderer/xterm.tsx | 100 ++- yarn.lock | 1453 +++++++++++++++++++------------------- 7 files changed, 904 insertions(+), 749 deletions(-) create mode 100644 src/renderer/xterm.css diff --git a/package.json b/package.json index 4ad1714..677785e 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@types/uuid": "^10.0.0", "@xterm/addon-canvas": "^0.7.0", "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-search": "^0.15.0", "@xterm/xterm": "^5.5.0", "electron": "^31.2.0", "electron-devtools-installer": "^3.2.0", diff --git a/src/renderer/app.css b/src/renderer/app.css index 47c1853..a53c0c8 100644 --- a/src/renderer/app.css +++ b/src/renderer/app.css @@ -14,3 +14,4 @@ body { background-color: #eeeeee; } } + diff --git a/src/renderer/header.tsx b/src/renderer/header.tsx index 6238079..7799317 100644 --- a/src/renderer/header.tsx +++ b/src/renderer/header.tsx @@ -1,4 +1,10 @@ -import { Button, ControlGroup, InputGroup, MenuItem, Tooltip } from "@blueprintjs/core"; +import { + Button, + ControlGroup, + InputGroup, + MenuItem, + Tooltip +} from "@blueprintjs/core"; import { Select } from "@blueprintjs/select"; import { type FC, useState } from "react"; import { useSelector } from "react-redux"; @@ -15,23 +21,23 @@ export const Header: FC = () => { style={{ WebkitAppRegion: "drag", padding: "10px 10px 10px 80px", - display: "flex", + display: "flex" }} >