@nexface/chat 0.1.21-alpha.0 → 0.1.21-alpha.2

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.
@@ -0,0 +1,23 @@
1
+ export declare class HistoryError extends Error {
2
+ readonly code: string;
3
+ constructor(code: string, message: string);
4
+ }
5
+ export declare class SessionCoordinator {
6
+ private readonly held;
7
+ private readonly acquiring;
8
+ private channel?;
9
+ private closed;
10
+ private watchers;
11
+ private notifyLocal?;
12
+ connect(notify: () => void): void;
13
+ watch(): () => void;
14
+ get visible(): boolean;
15
+ private manager;
16
+ owns(id: string): boolean;
17
+ acquire(id: string): Promise<boolean>;
18
+ release(id: string): void;
19
+ write<T>(work: () => T | Promise<T>): Promise<T>;
20
+ occupied(): Promise<Set<string>>;
21
+ notify(): void;
22
+ close(): void;
23
+ }
@@ -0,0 +1,139 @@
1
+ const prefix = "nexface:chat:v4:";
2
+ const listeners = new Set();
3
+ export class HistoryError extends Error {
4
+ code;
5
+ constructor(code, message) {
6
+ super(message);
7
+ this.code = code;
8
+ this.name = "HistoryError";
9
+ }
10
+ }
11
+ export class SessionCoordinator {
12
+ held = new Map();
13
+ acquiring = new Map();
14
+ channel;
15
+ closed = false;
16
+ watchers = 0;
17
+ notifyLocal;
18
+ connect(notify) {
19
+ this.closed = false;
20
+ if (this.notifyLocal)
21
+ listeners.delete(this.notifyLocal);
22
+ this.channel?.close();
23
+ delete this.channel;
24
+ this.notifyLocal = notify;
25
+ listeners.add(notify);
26
+ if (typeof BroadcastChannel !== "undefined") {
27
+ this.channel = new BroadcastChannel(`${prefix}events`);
28
+ this.channel.onmessage = () => notify();
29
+ }
30
+ }
31
+ watch() {
32
+ this.watchers++;
33
+ this.notifyLocal?.();
34
+ return () => {
35
+ this.watchers--;
36
+ };
37
+ }
38
+ get visible() {
39
+ return this.watchers > 0;
40
+ }
41
+ manager() {
42
+ if (!globalThis.navigator?.locks)
43
+ throw new HistoryError("CHAT_STORAGE_UNAVAILABLE", "Chat history requires the Web Locks API in a secure browser context.");
44
+ return navigator.locks;
45
+ }
46
+ owns(id) {
47
+ return this.held.has(id);
48
+ }
49
+ acquire(id) {
50
+ if (this.closed)
51
+ return Promise.resolve(false);
52
+ if (this.owns(id))
53
+ return Promise.resolve(true);
54
+ const pending = this.acquiring.get(id);
55
+ if (pending)
56
+ return pending;
57
+ let resolve;
58
+ let reject;
59
+ const result = new Promise((yes, no) => {
60
+ resolve = yes;
61
+ reject = no;
62
+ });
63
+ this.acquiring.set(id, result);
64
+ let granted = false;
65
+ try {
66
+ void this.manager()
67
+ .request(`${prefix}session:${id}`, { ifAvailable: true }, async (lock) => {
68
+ if (!lock || this.closed) {
69
+ this.acquiring.delete(id);
70
+ resolve(false);
71
+ return;
72
+ }
73
+ await new Promise((release) => {
74
+ granted = true;
75
+ this.held.set(id, release);
76
+ this.acquiring.delete(id);
77
+ resolve(true);
78
+ this.notify();
79
+ });
80
+ })
81
+ .catch((cause) => {
82
+ this.acquiring.delete(id);
83
+ reject(cause);
84
+ })
85
+ .finally(() => {
86
+ if (granted)
87
+ setTimeout(() => this.notify(), 0);
88
+ });
89
+ }
90
+ catch (cause) {
91
+ this.acquiring.delete(id);
92
+ reject(cause);
93
+ }
94
+ return result;
95
+ }
96
+ release(id) {
97
+ const release = this.held.get(id);
98
+ if (!release)
99
+ return;
100
+ this.held.delete(id);
101
+ release();
102
+ // The request completion above notifies after actual browser lock release.
103
+ }
104
+ write(work) {
105
+ return this.manager()
106
+ .request(`${prefix}storage`, () => {
107
+ if (this.closed)
108
+ throw new HistoryError("CHAT_STORAGE_UNAVAILABLE", "The chat history owner has been closed.");
109
+ return work();
110
+ })
111
+ .then((value) => value);
112
+ }
113
+ async occupied() {
114
+ const state = await this.manager().query();
115
+ return new Set((state.held ?? [])
116
+ .flatMap((lock) => {
117
+ const name = lock.name ?? "";
118
+ return name.startsWith(`${prefix}session:`)
119
+ ? [name.slice(`${prefix}session:`.length)]
120
+ : [];
121
+ })
122
+ .filter((id) => !this.owns(id)));
123
+ }
124
+ notify() {
125
+ for (const listener of listeners)
126
+ listener();
127
+ this.channel?.postMessage({ type: "changed" });
128
+ }
129
+ close() {
130
+ this.closed = true;
131
+ if (this.notifyLocal)
132
+ listeners.delete(this.notifyLocal);
133
+ delete this.notifyLocal;
134
+ this.channel?.close();
135
+ delete this.channel;
136
+ for (const id of this.held.keys())
137
+ this.release(id);
138
+ }
139
+ }
@@ -0,0 +1,29 @@
1
+ import { type StoredSession } from "./storage.js";
2
+ import { HistoryError, SessionCoordinator } from "./session-coordinator.js";
3
+ export declare const historyMetaKey = "nexface:chat:sessions:v4:meta";
4
+ export declare const historySessionKey: (id: string) => string;
5
+ declare const locked: () => HistoryError;
6
+ export { locked as sessionLockedError };
7
+ export declare class SessionHistory {
8
+ readonly coordinator: SessionCoordinator;
9
+ private generation?;
10
+ private readonly seen;
11
+ private readonly reusable;
12
+ private readonly observed;
13
+ private readonly opened;
14
+ private readonly fresh;
15
+ private readonly baselines;
16
+ private initialized?;
17
+ onEvict?: (count: number) => void;
18
+ initialize(): Promise<void>;
19
+ list(): StoredSession[];
20
+ unchangedSinceSaved(id: string): boolean;
21
+ private snapshot;
22
+ open(id: string, fresh?: boolean): Promise<StoredSession | undefined>;
23
+ isSaved(session: StoredSession): boolean;
24
+ canReuse(id: string): boolean;
25
+ adoptRestored(session: StoredSession): void;
26
+ private commit;
27
+ save(session: StoredSession): Promise<void>;
28
+ remove(ids: string[], clearAll?: boolean): Promise<void>;
29
+ }
@@ -0,0 +1,282 @@
1
+ import { decodeChatStorage, encodeSession } from "./storage.js";
2
+ import { HistoryError, SessionCoordinator } from "./session-coordinator.js";
3
+ const prefix = "nexface:chat:sessions:v4:";
4
+ export const historyMetaKey = `${prefix}meta`;
5
+ export const historySessionKey = (id) => `${prefix}session:${id}`;
6
+ const failure = (message) => new HistoryError("CHAT_STORAGE_UNAVAILABLE", message);
7
+ const quota = (cause) => cause instanceof DOMException && cause.name === "QuotaExceededError";
8
+ const conflict = () => new HistoryError("CHAT_HISTORY_CONFLICT", "This chat history changed outside this page. Refresh before continuing.");
9
+ const locked = () => new HistoryError("CHAT_SESSION_LOCKED", "This conversation is already open in another tab.");
10
+ export { locked as sessionLockedError };
11
+ function keys() {
12
+ const found = [];
13
+ for (let i = 0; i < localStorage.length; i++) {
14
+ const key = localStorage.key(i);
15
+ if (key?.startsWith(`${prefix}session:`))
16
+ found.push(key);
17
+ }
18
+ return found;
19
+ }
20
+ function parseMeta() {
21
+ const raw = localStorage.getItem(historyMetaKey);
22
+ if (raw === null)
23
+ return;
24
+ const value = JSON.parse(raw);
25
+ if (value?.version !== 4 || typeof value.generation !== "string")
26
+ throw failure("Chat history metadata is invalid. Keep the stored data and refresh to retry.");
27
+ return value;
28
+ }
29
+ function read() {
30
+ const meta = parseMeta() ?? { version: 4, generation: "initial" };
31
+ const entries = keys().flatMap((key) => {
32
+ const raw = localStorage.getItem(key);
33
+ if (raw === null)
34
+ return [];
35
+ const entry = JSON.parse(raw);
36
+ if (entry?.version !== 4 || typeof entry.generation !== "string")
37
+ throw failure("Stored chat history is invalid.");
38
+ if (entry.generation !== meta.generation)
39
+ return [];
40
+ if (!Number.isSafeInteger(entry.revision) ||
41
+ entry.revision < 1 ||
42
+ !Number.isFinite(entry.createdAt) ||
43
+ !Number.isFinite(entry.lastUsedAt) ||
44
+ historySessionKey(entry.session?.id) !== key)
45
+ throw failure("Stored chat history is invalid.");
46
+ const decoded = decodeChatStorage(JSON.stringify({ version: 3, activeSessionId: entry.session.id, sessions: [entry.session] }));
47
+ if (!decoded)
48
+ throw failure("Stored chat history is invalid.");
49
+ return [entry];
50
+ });
51
+ entries.sort((a, b) => a.createdAt - b.createdAt || a.session.id.localeCompare(b.session.id));
52
+ return { meta, entries };
53
+ }
54
+ // Compare persisted business content independently of recency metadata.
55
+ const signature = (entry) => JSON.stringify(encodeSession(entry.session));
56
+ const fingerprint = (entry) => `${entry.revision}:${signature(entry)}`;
57
+ const restored = (session) => decodeChatStorage(JSON.stringify({ version: 3, activeSessionId: session.id, sessions: [session] })).sessions[0];
58
+ export class SessionHistory {
59
+ coordinator = new SessionCoordinator();
60
+ generation;
61
+ seen = new Map();
62
+ reusable = new Set();
63
+ observed = new Map();
64
+ opened = new Map();
65
+ fresh = new Set();
66
+ baselines = new Map();
67
+ initialized;
68
+ onEvict;
69
+ initialize() {
70
+ return (this.initialized ??= this.coordinator.write(() => {
71
+ this.generation = read().meta.generation;
72
+ }));
73
+ }
74
+ list() {
75
+ const entries = read().entries;
76
+ this.observed.clear();
77
+ for (const entry of entries)
78
+ this.observed.set(entry.session.id, fingerprint(entry));
79
+ return entries.map((entry) => restored(entry.session));
80
+ }
81
+ unchangedSinceSaved(id) {
82
+ return this.seen.has(id) && this.seen.get(id) === this.observed.get(id);
83
+ }
84
+ snapshot(fresh = false) {
85
+ const state = read();
86
+ if (this.generation !== state.meta.generation) {
87
+ if (fresh)
88
+ this.generation = state.meta.generation;
89
+ else
90
+ throw conflict();
91
+ }
92
+ return state;
93
+ }
94
+ async open(id, fresh = false) {
95
+ await this.initialize();
96
+ if (!(await this.coordinator.acquire(id)))
97
+ throw locked();
98
+ try {
99
+ return await this.coordinator.write(() => {
100
+ const state = this.snapshot(fresh);
101
+ const entry = state.entries.find((item) => item.session.id === id);
102
+ if (!entry && !fresh)
103
+ throw new HistoryError("UNKNOWN_SESSION", "This conversation was deleted. Choose another conversation.");
104
+ if (entry) {
105
+ if (this.seen.get(id) === fingerprint(entry))
106
+ this.reusable.add(id);
107
+ else
108
+ this.reusable.delete(id);
109
+ this.seen.set(id, fingerprint(entry));
110
+ this.baselines.set(id, JSON.stringify(encodeSession(restored(entry.session))));
111
+ }
112
+ else
113
+ this.fresh.add(id);
114
+ this.opened.set(id, Math.max(Date.now(), ...state.entries.map((item) => item.lastUsedAt + 1)));
115
+ if (entry) {
116
+ try {
117
+ this.commit({
118
+ ...entry,
119
+ lastUsedAt: this.opened.get(id),
120
+ session: encodeSession(entry.session),
121
+ });
122
+ }
123
+ catch {
124
+ /* Recency alone must never evict history or block opening. */
125
+ }
126
+ }
127
+ return entry ? restored(entry.session) : undefined;
128
+ });
129
+ }
130
+ catch (cause) {
131
+ this.coordinator.release(id);
132
+ throw cause;
133
+ }
134
+ }
135
+ isSaved(session) {
136
+ return (this.baselines.get(session.id) === JSON.stringify(encodeSession(session)) ||
137
+ (!session.messages.length && !session.title));
138
+ }
139
+ canReuse(id) {
140
+ return this.reusable.has(id);
141
+ }
142
+ adoptRestored(session) {
143
+ this.baselines.set(session.id, JSON.stringify(encodeSession(session)));
144
+ }
145
+ commit(entry, removed) {
146
+ if (removed)
147
+ localStorage.removeItem(historySessionKey(removed));
148
+ else if (entry)
149
+ localStorage.setItem(historySessionKey(entry.session.id), JSON.stringify(entry));
150
+ }
151
+ async save(session) {
152
+ await this.initialize();
153
+ if (!this.coordinator.owns(session.id))
154
+ throw locked();
155
+ // Encode before deleting anything. Snapshot/encoding errors must never trigger LRU.
156
+ const encoded = encodeSession(session);
157
+ const baseline = JSON.stringify(encoded);
158
+ if (this.baselines.get(session.id) === baseline)
159
+ return;
160
+ await this.coordinator.write(async () => {
161
+ if (!this.coordinator.owns(session.id))
162
+ throw locked();
163
+ let state = this.snapshot(this.fresh.has(session.id));
164
+ let existing = state.entries.find((item) => item.session.id === session.id);
165
+ if (existing ? this.seen.get(session.id) !== fingerprint(existing) : !this.fresh.has(session.id))
166
+ throw conflict();
167
+ if (!existing && !encoded.messages.length && !encoded.title)
168
+ return;
169
+ const entry = {
170
+ version: 4,
171
+ generation: state.meta.generation,
172
+ revision: (existing?.revision ?? 0) + 1,
173
+ createdAt: existing?.createdAt ??
174
+ Math.max(Date.now(), ...state.entries.map((item) => item.createdAt + 1)),
175
+ lastUsedAt: Math.max(Date.now(), this.opened.get(session.id) ?? 0, ...state.entries.map((item) => item.lastUsedAt + 1)),
176
+ session: encoded,
177
+ };
178
+ // Empty sessions and read-only mounts do not create storage records.
179
+ if (localStorage.getItem(historyMetaKey) === null)
180
+ localStorage.setItem(historyMetaKey, JSON.stringify(state.meta));
181
+ const candidates = state.entries
182
+ .filter((item) => item.session.id !== session.id)
183
+ .sort((a, b) => a.lastUsedAt - b.lastUsedAt ||
184
+ a.createdAt - b.createdAt ||
185
+ a.session.id.localeCompare(b.session.id));
186
+ let evicted = 0;
187
+ try {
188
+ for (;;) {
189
+ if (!this.coordinator.owns(session.id))
190
+ throw locked();
191
+ try {
192
+ this.commit(entry);
193
+ break;
194
+ }
195
+ catch (cause) {
196
+ if (!quota(cause))
197
+ throw cause;
198
+ let removed = false;
199
+ while (candidates.length) {
200
+ const candidate = candidates.shift();
201
+ const id = candidate.session.id;
202
+ if (this.coordinator.owns(id) || !(await this.coordinator.acquire(id)))
203
+ continue;
204
+ try {
205
+ // All writers share the storage lock; the session lock protects opening races.
206
+ state = this.snapshot();
207
+ existing = state.entries.find((item) => item.session.id === id);
208
+ if (!existing)
209
+ continue;
210
+ if (!this.coordinator.owns(session.id))
211
+ throw locked();
212
+ this.commit(undefined, id);
213
+ state.entries = state.entries.filter((item) => item.session.id !== id);
214
+ removed = true;
215
+ evicted++;
216
+ this.coordinator.notify();
217
+ break;
218
+ }
219
+ finally {
220
+ this.coordinator.release(id);
221
+ }
222
+ }
223
+ if (!removed)
224
+ throw new HistoryError("CHAT_STORAGE_FULL", "Chat history could not be saved because storage is full. Free space and retry. Older conversations may already have been removed.");
225
+ }
226
+ }
227
+ this.seen.set(session.id, fingerprint(entry));
228
+ this.baselines.set(session.id, baseline);
229
+ this.fresh.delete(session.id);
230
+ this.coordinator.notify();
231
+ }
232
+ finally {
233
+ if (evicted)
234
+ this.onEvict?.(evicted);
235
+ }
236
+ });
237
+ }
238
+ async remove(ids, clearAll = false) {
239
+ await this.initialize();
240
+ const temporary = [];
241
+ let modified = false;
242
+ try {
243
+ // Never wait for a session while holding the global writer lock.
244
+ await this.coordinator.write(async () => {
245
+ const state = this.snapshot();
246
+ const targets = clearAll
247
+ ? [...new Set([...ids, ...state.entries.map((entry) => entry.session.id)])]
248
+ : ids;
249
+ for (const id of [...targets].sort()) {
250
+ if (this.coordinator.owns(id))
251
+ continue;
252
+ if (!(await this.coordinator.acquire(id)))
253
+ throw locked();
254
+ temporary.push(id);
255
+ }
256
+ if (clearAll) {
257
+ const meta = { ...state.meta, generation: crypto.randomUUID() };
258
+ localStorage.setItem(historyMetaKey, JSON.stringify(meta));
259
+ this.generation = meta.generation;
260
+ this.baselines.clear();
261
+ modified = true;
262
+ }
263
+ for (const id of targets) {
264
+ this.commit(undefined, id);
265
+ modified = true;
266
+ state.entries = state.entries.filter((entry) => entry.session.id !== id);
267
+ }
268
+ for (const id of targets) {
269
+ this.seen.delete(id);
270
+ this.baselines.delete(id);
271
+ this.fresh.delete(id);
272
+ }
273
+ });
274
+ }
275
+ finally {
276
+ if (modified)
277
+ this.coordinator.notify();
278
+ for (const id of temporary)
279
+ this.coordinator.release(id);
280
+ }
281
+ }
282
+ }
package/dist/storage.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { AgentMessage } from "@nexface/agent";
2
2
  import type { UIMessage } from "./react.js";
3
3
  export declare const chatStorageKey = "nexface:chat:sessions:v3";
4
- interface StoredSession {
4
+ export interface StoredSession {
5
5
  id: string;
6
6
  title?: string;
7
7
  appendOnly?: boolean;
@@ -11,10 +11,7 @@ interface StoredChat {
11
11
  sessions: StoredSession[];
12
12
  activeSessionId: string;
13
13
  }
14
- export interface ChatStorageVersion {
15
- value: string | null;
16
- }
17
- export declare function readChatStorage(key: string, version?: ChatStorageVersion): StoredChat | undefined;
18
- export declare function writeChatStorage(key: string, state: StoredChat, version: ChatStorageVersion): "saved" | "unchanged" | "conflict" | "unavailable";
14
+ export declare function decodeChatStorage(raw: string | null): StoredChat | undefined;
15
+ export declare function encodeSession(session: StoredSession): StoredSession;
19
16
  export declare function conversationFromMessages(messages: readonly UIMessage[]): AgentMessage[];
20
17
  export {};
package/dist/storage.js CHANGED
@@ -146,6 +146,21 @@ function restoreMessage(message) {
146
146
  });
147
147
  return {
148
148
  ...message,
149
+ ...(message.attachments
150
+ ? {
151
+ attachments: message.attachments.map((attachment) => {
152
+ const image = attachmentContent(attachment).find((content) => content.type === "image" && content.source.type === "data");
153
+ return attachment.preview === undefined &&
154
+ image?.type === "image" &&
155
+ image.source.type === "data"
156
+ ? {
157
+ ...attachment,
158
+ preview: `data:${image.source.mimeType ?? "image/png"};base64,${image.source.value}`,
159
+ }
160
+ : attachment;
161
+ }),
162
+ }
163
+ : {}),
149
164
  parts,
150
165
  ...(unfinished ? { state: "error" } : {}),
151
166
  ...(error ? { error } : {}),
@@ -159,16 +174,10 @@ function withoutReasoning(messages) {
159
174
  return [{ ...message, parts }];
160
175
  });
161
176
  }
162
- export function readChatStorage(key, version) {
177
+ export function decodeChatStorage(raw) {
163
178
  try {
164
- const raw = localStorage.getItem(key);
165
- if (version)
166
- version.value = raw;
167
179
  const value = JSON.parse(raw ?? "null");
168
- if (!record(value) ||
169
- value.version !== 3 ||
170
- !Array.isArray(value.sessions) ||
171
- !value.sessions.length)
180
+ if (!record(value) || value.version !== 3 || !Array.isArray(value.sessions))
172
181
  return;
173
182
  const sessions = [];
174
183
  for (const session of value.sessions) {
@@ -188,48 +197,45 @@ export function readChatStorage(key, version) {
188
197
  messages: migratePageTaskResults(withoutReasoning(session.messages)).map(restoreMessage),
189
198
  });
190
199
  }
191
- const activeSessionId = sessions.find((session) => session.id === value.activeSessionId)?.id ?? sessions[0].id;
200
+ const activeSessionId = sessions.find((session) => session.id === value.activeSessionId)?.id ?? sessions[0]?.id ?? "";
192
201
  return { sessions, activeSessionId };
193
202
  }
194
203
  catch {
195
204
  return undefined;
196
205
  }
197
206
  }
198
- export function writeChatStorage(key, state, version) {
199
- try {
200
- const next = JSON.stringify({
201
- version: 3,
202
- activeSessionId: state.activeSessionId,
203
- sessions: state.sessions.map(({ id, title, appendOnly, messages }) => ({
204
- id,
205
- title,
206
- ...(appendOnly ? { appendOnly } : {}),
207
- messages: withoutReasoning(messages).map((message) => ({
208
- ...message,
209
- parts: message.parts.map((part) => part.type === "tool" && part.error
210
- ? {
211
- ...part,
212
- errorMessage: part.error.userMessage,
213
- result: JSON.stringify({
214
- error: { code: part.error.code, message: part.error.userMessage },
215
- }),
216
- }
217
- : part),
218
- })),
219
- })),
220
- });
221
- if (next === version.value)
222
- return "unchanged";
223
- if (localStorage.getItem(key) !== version.value)
224
- return "conflict";
225
- localStorage.setItem(key, next);
226
- version.value = next;
227
- return "saved";
228
- }
229
- catch {
230
- // Storage restrictions or quota exhaustion must not break the active chat.
231
- return "unavailable";
232
- }
207
+ export function encodeSession(session) {
208
+ return {
209
+ id: session.id,
210
+ ...(session.title ? { title: session.title } : {}),
211
+ ...(session.appendOnly ? { appendOnly: true } : {}),
212
+ messages: withoutReasoning(session.messages).map((message) => ({
213
+ ...message,
214
+ ...(message.attachments
215
+ ? {
216
+ attachments: message.attachments.map((attachment) => {
217
+ const contents = attachmentContent(attachment);
218
+ if (!contents.some((content) => content.type === "image" &&
219
+ content.source.type === "data" &&
220
+ attachment.preview ===
221
+ `data:${content.source.mimeType ?? "image/png"};base64,${content.source.value}`))
222
+ return attachment;
223
+ const { preview: _preview, ...saved } = attachment;
224
+ return saved;
225
+ }),
226
+ }
227
+ : {}),
228
+ parts: message.parts.map((part) => part.type === "tool" && part.error
229
+ ? {
230
+ ...part,
231
+ errorMessage: part.error.userMessage,
232
+ result: JSON.stringify({
233
+ error: { code: part.error.code, message: part.error.userMessage },
234
+ }),
235
+ }
236
+ : part),
237
+ })),
238
+ };
233
239
  }
234
240
  export function conversationFromMessages(messages) {
235
241
  const legacy = new Set([
package/dist/styles.css CHANGED
@@ -939,6 +939,10 @@
939
939
  max-width: 85%;
940
940
  }
941
941
 
942
+ .nexface-ui .nxf-max-w-\[min\(20rem\,var\(--radix-tooltip-content-available-width\)\)\] {
943
+ max-width: min(20rem, var(--radix-tooltip-content-available-width));
944
+ }
945
+
942
946
  .nexface-ui .nxf-max-w-full {
943
947
  max-width: 100%;
944
948
  }
@@ -2670,7 +2674,7 @@
2670
2674
  pointer-events: none;
2671
2675
  }
2672
2676
 
2673
- .nexface-ui .nxf-data-\[disabled\]\:opacity-50[data-disabled] {
2677
+ .nexface-ui .nxf-data-\[disabled\]\:opacity-50[data-disabled],.nexface-ui .nxf-data-\[disabled\=true\]\:opacity-50[data-disabled="true"] {
2674
2678
  opacity: .5;
2675
2679
  }
2676
2680
 
@@ -6,7 +6,8 @@ export declare function ThreadListSearch({ value, onValueChange, }: {
6
6
  value: string;
7
7
  onValueChange(value: string): void;
8
8
  }): import("react").JSX.Element;
9
- export declare function ThreadListItem({ disabled, menu, }: {
9
+ export declare function ThreadListItem({ disabled, menu, disabledReason, }: {
10
10
  disabled: boolean;
11
+ disabledReason?: string | undefined;
11
12
  menu: (beginRename: () => void) => ReactNode;
12
13
  }): import("react").JSX.Element;