arp-tui 0.0.6 → 0.0.8
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/index.js +16 -9
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1822,6 +1822,9 @@ var RelayWs = class {
|
|
|
1822
1822
|
};
|
|
1823
1823
|
|
|
1824
1824
|
// src/state/store.ts
|
|
1825
|
+
function attentionConfirmTarget(channels, channelId) {
|
|
1826
|
+
return channels.find((c) => c.id === channelId)?.name ?? channelId.slice(0, 8);
|
|
1827
|
+
}
|
|
1825
1828
|
function filterChannels(channels, filter) {
|
|
1826
1829
|
const f = filter.trim().toLowerCase();
|
|
1827
1830
|
if (!f) return channels;
|
|
@@ -2234,7 +2237,7 @@ function createStore(opts) {
|
|
|
2234
2237
|
set({ mode: "attention_confirm", attentionDraft: "", error: null });
|
|
2235
2238
|
}
|
|
2236
2239
|
function setAttentionDraft(value) {
|
|
2237
|
-
const max = state.mode === "attention_level" ? 32 : state.mode === "attention_confirm" ?
|
|
2240
|
+
const max = state.mode === "attention_level" ? 32 : state.mode === "attention_confirm" ? 256 : 1024;
|
|
2238
2241
|
if (Buffer.byteLength(value, "utf8") <= max) set({ attentionDraft: value });
|
|
2239
2242
|
}
|
|
2240
2243
|
function submitAttentionInput() {
|
|
@@ -2260,8 +2263,9 @@ function createStore(opts) {
|
|
|
2260
2263
|
return;
|
|
2261
2264
|
}
|
|
2262
2265
|
if (state.mode === "attention_confirm") {
|
|
2263
|
-
if (state.
|
|
2264
|
-
|
|
2266
|
+
if (!state.activeChannelId) return;
|
|
2267
|
+
if (state.attentionDraft !== attentionConfirmTarget(state.channels, state.activeChannelId)) {
|
|
2268
|
+
set({ error: "confirmation did not match the channel name" });
|
|
2265
2269
|
return;
|
|
2266
2270
|
}
|
|
2267
2271
|
if (pendingAttentionAck) void performAttentionAck(pendingAttentionAck);
|
|
@@ -2909,18 +2913,20 @@ var LEVEL_COLOR = {
|
|
|
2909
2913
|
critical: "red"
|
|
2910
2914
|
};
|
|
2911
2915
|
function AttentionPanel({
|
|
2912
|
-
|
|
2916
|
+
channelName,
|
|
2917
|
+
channelKind,
|
|
2913
2918
|
items,
|
|
2914
2919
|
selected,
|
|
2915
2920
|
mode,
|
|
2916
2921
|
draft,
|
|
2917
2922
|
busy
|
|
2918
2923
|
}) {
|
|
2919
|
-
const prompt = mode === "attention_level" ? "level (info | action_required | critical)" : mode === "attention_reason" ? "reason" : mode === "attention_confirm" ? `type ${
|
|
2924
|
+
const prompt = mode === "attention_level" ? "level (info | action_required | critical)" : mode === "attention_reason" ? "reason" : mode === "attention_confirm" ? `type ${sanitizeForTty(channelName)} to confirm` : null;
|
|
2920
2925
|
return /* @__PURE__ */ jsxs3(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
|
|
2921
2926
|
/* @__PURE__ */ jsxs3(Text3, { bold: true, children: [
|
|
2922
|
-
"ATTENTION
|
|
2923
|
-
|
|
2927
|
+
"ATTENTION ",
|
|
2928
|
+
channelSigil(channelKind),
|
|
2929
|
+
sanitizeLabel(channelName)
|
|
2924
2930
|
] }),
|
|
2925
2931
|
items.length === 0 ? /* @__PURE__ */ jsx3(Text3, { dimColor: true, children: "no active attention" }) : items.map((item, index) => /* @__PURE__ */ jsxs3(Box2, { flexDirection: "column", children: [
|
|
2926
2932
|
/* @__PURE__ */ jsxs3(Text3, { children: [
|
|
@@ -3490,7 +3496,8 @@ function App({ store: store2 }) {
|
|
|
3490
3496
|
state.mode.startsWith("attention") && state.activeChannelId ? /* @__PURE__ */ jsx12(
|
|
3491
3497
|
AttentionPanel,
|
|
3492
3498
|
{
|
|
3493
|
-
|
|
3499
|
+
channelName: attentionConfirmTarget(state.channels, state.activeChannelId),
|
|
3500
|
+
channelKind: activeChannel?.kind,
|
|
3494
3501
|
items: state.channelAttention,
|
|
3495
3502
|
selected: state.attentionSelected,
|
|
3496
3503
|
mode: state.mode,
|
|
@@ -3610,7 +3617,7 @@ unknown profile command "${args2.sub}".`);
|
|
|
3610
3617
|
|
|
3611
3618
|
// src/api/bridgeProcess.ts
|
|
3612
3619
|
import { spawn as spawn2 } from "child_process";
|
|
3613
|
-
var DEFAULT_BRIDGE_CMD = "npx -y
|
|
3620
|
+
var DEFAULT_BRIDGE_CMD = "npx -y @snowyroad/braid";
|
|
3614
3621
|
var ENROLL_TIMEOUT_MS = 12e4;
|
|
3615
3622
|
var STDERR_TAIL_CHARS = 600;
|
|
3616
3623
|
function resolveBridgeCmd(flag, env = process.env) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arp-tui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "arp-tui",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.8",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"ink": "^5.2.0",
|
package/package.json
CHANGED