@profullstack/qryptchat 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-8m3j5hfk.js → chunk-jdt6p3k7.js} +3 -1
- package/dist/commands.js +1 -1
- package/dist/mcp.js +1 -1
- package/dist/tui.js +13 -5
- package/package.json +2 -2
|
@@ -1370,7 +1370,9 @@ Usage:
|
|
|
1370
1370
|
|
|
1371
1371
|
<chat> is a chat id or part of its name. Options: --json, --url <server> (or QC_URL).
|
|
1372
1372
|
Keys and tokens are sealed (ChaCha20-Poly1305) in ${"$"}QC_HOME or ~/.config/qc; the key is in your
|
|
1373
|
-
OS keychain, or comes from a passphrase (QC_PASSPHRASE for scripts and qc mcp)
|
|
1373
|
+
OS keychain, or comes from a passphrase (QC_PASSPHRASE for scripts and qc mcp).
|
|
1374
|
+
HD: emoji and icons are drawn as our OpenEmoji/OpenIcon images in Kitty and Ghostty. Over SSH or in
|
|
1375
|
+
tmux (set -g allow-passthrough on), run with QC_HD=1; QC_HD=0 turns it off.`;
|
|
1374
1376
|
function parseArgs2(argv) {
|
|
1375
1377
|
const args = { _: [], flags: {} };
|
|
1376
1378
|
for (let i = 0;i < argv.length; i++) {
|
package/dist/commands.js
CHANGED
package/dist/mcp.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-vfahhydf.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/tui.js
|
|
6
|
-
import { createApp, editText, emojify, insertText, stringWidth, truncate, widgets, wrap } from "@profullstack/hqtui";
|
|
6
|
+
import { createApp, createImageStore, drawIcon, drawRichText, editText, emojify, insertText, stringWidth, truncate, widgets, wrap } from "@profullstack/hqtui";
|
|
7
7
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { join } from "node:path";
|
|
9
9
|
var SIDEBAR = 30;
|
|
@@ -99,9 +99,9 @@ function drawTranscript(surface, state) {
|
|
|
99
99
|
if (line.spans) {
|
|
100
100
|
let x = 0;
|
|
101
101
|
for (const span of line.spans)
|
|
102
|
-
x += surface
|
|
102
|
+
x += drawRichText(surface, x, y, span.text, { fg: span.fg, attrs: span.bold ? 1 : 0 }, state.images);
|
|
103
103
|
} else {
|
|
104
|
-
surface
|
|
104
|
+
drawRichText(surface, 0, y, truncate(line.text, surface.width), { fg: line.fg }, state.images);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
if (state.scrollBack > 0) {
|
|
@@ -116,7 +116,10 @@ function render({ ui, width, height, theme }, state, on = {}) {
|
|
|
116
116
|
bar.draw((s) => {
|
|
117
117
|
const t = s.theme;
|
|
118
118
|
s.fillRect(0, 0, s.width, 1, { bg: t.surface ?? t.background });
|
|
119
|
-
|
|
119
|
+
const brand = { fg: t.background, bg: t.primary, attrs: 1 };
|
|
120
|
+
let x = s.text(0, 0, " ", brand);
|
|
121
|
+
x += drawIcon(s, x, 0, "lock", state.images, "\uD83D\uDD12", brand);
|
|
122
|
+
x += s.text(x, 0, " qrypt.chat ", brand);
|
|
120
123
|
x += s.text(x, 0, ` @${state.me?.username ?? "?"}`, { fg: t.foreground, bg: t.surface ?? t.background });
|
|
121
124
|
if (state.notice)
|
|
122
125
|
s.text(x + 2, 0, truncate(state.notice, Math.max(0, s.width - x - 16)), { fg: t.warning, bg: t.surface ?? t.background });
|
|
@@ -210,6 +213,8 @@ async function runTui(client, { initialChat } = {}) {
|
|
|
210
213
|
const abort = new AbortController;
|
|
211
214
|
const app = await createApp({ quitKeys: ["ctrl+c"], focusNavigation: false });
|
|
212
215
|
const redraw = () => app.invalidate();
|
|
216
|
+
const env = process.env.QC_HD && !process.env.HQTUI_IMAGES ? { ...process.env, HQTUI_IMAGES: process.env.QC_HD } : process.env;
|
|
217
|
+
state.images = createImageStore({ write: (seq) => app.terminal.write(seq), onReady: redraw, env });
|
|
213
218
|
const note = (msg, { sticky = false } = {}) => {
|
|
214
219
|
state.notice = msg;
|
|
215
220
|
redraw();
|
|
@@ -378,7 +383,10 @@ async function runTui(client, { initialChat } = {}) {
|
|
|
378
383
|
state.field = insertText(state.field, event.text);
|
|
379
384
|
redraw();
|
|
380
385
|
});
|
|
381
|
-
app.on("exit", () =>
|
|
386
|
+
app.on("exit", () => {
|
|
387
|
+
state.images?.clear();
|
|
388
|
+
abort.abort();
|
|
389
|
+
});
|
|
382
390
|
app.render((args) => render(args, state, handlers));
|
|
383
391
|
loadConversations();
|
|
384
392
|
client.events(({ type, data }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@profullstack/qryptchat",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "qc: qrypt.chat in your terminal. A full-screen end-to-end encrypted chat client (ML-KEM-1024), plus a scriptable CLI and an MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@noble/ciphers": "^2.0.0",
|
|
20
|
-
"@profullstack/hqtui": "^0.
|
|
20
|
+
"@profullstack/hqtui": "^0.9.0",
|
|
21
21
|
"mlkem": "^2.5.0"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|