aoaoe 0.92.0 → 0.93.0
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/input.js +1 -1
- package/dist/tui.d.ts +6 -2
- package/dist/tui.js +17 -4
- package/package.json +1 -1
package/dist/input.js
CHANGED
|
@@ -337,7 +337,7 @@ ${BOLD}navigation:${RESET}
|
|
|
337
337
|
/focus toggle focus mode (show only pinned sessions)
|
|
338
338
|
/mute [N|name] mute/unmute a session's activity entries (toggle)
|
|
339
339
|
/unmute-all unmute all sessions at once
|
|
340
|
-
/filter [tag] filter activity by tag
|
|
340
|
+
/filter [tag] filter activity by tag — presets: errors, actions, system (no arg = clear)
|
|
341
341
|
/uptime show session uptimes (time since first observed)
|
|
342
342
|
/auto-pin toggle auto-pin on error (pin sessions that emit errors)
|
|
343
343
|
/note N|name text attach a note to a session (no text = clear)
|
package/dist/tui.d.ts
CHANGED
|
@@ -53,8 +53,12 @@ export declare function truncateNote(text: string): string;
|
|
|
53
53
|
export declare function shouldMuteEntry(entry: ActivityEntry, mutedIds: Set<string>): boolean;
|
|
54
54
|
/** Format a suppressed entry count badge for muted sessions. Returns empty string for 0. */
|
|
55
55
|
export declare function formatMuteBadge(count: number): string;
|
|
56
|
-
/** Check if an activity entry matches a tag filter (case-insensitive
|
|
56
|
+
/** Check if an activity entry matches a tag filter (case-insensitive, supports pipe-separated multi-tag). */
|
|
57
57
|
export declare function matchesTagFilter(entry: ActivityEntry, tag: string): boolean;
|
|
58
|
+
/** Built-in filter presets: name → pipe-separated tag pattern. */
|
|
59
|
+
export declare const FILTER_PRESETS: Record<string, string>;
|
|
60
|
+
/** Resolve a filter string — expands preset names, returns raw tag otherwise. */
|
|
61
|
+
export declare function resolveFilterPreset(input: string): string;
|
|
58
62
|
/** Format the tag filter indicator text for the separator bar. */
|
|
59
63
|
export declare function formatTagFilterIndicator(tag: string, matchCount: number, totalCount: number): string;
|
|
60
64
|
/** Default number of entries for /clip when no count specified. */
|
|
@@ -241,7 +245,7 @@ export declare class TUI {
|
|
|
241
245
|
setSearch(pattern: string | null): void;
|
|
242
246
|
/** Get the current search pattern (or null if no active search). */
|
|
243
247
|
getSearchPattern(): string | null;
|
|
244
|
-
/** Set or clear the tag filter. Resets scroll and repaints. */
|
|
248
|
+
/** Set or clear the tag filter. Resolves presets (e.g. "errors"). Resets scroll and repaints. */
|
|
245
249
|
setTagFilter(tag: string | null): void;
|
|
246
250
|
/** Get the current tag filter (or null if none active). */
|
|
247
251
|
getTagFilter(): string | null;
|
package/dist/tui.js
CHANGED
|
@@ -194,11 +194,24 @@ export function formatMuteBadge(count) {
|
|
|
194
194
|
const label = count > 999 ? "999+" : String(count);
|
|
195
195
|
return `${DIM}(${label})${RESET}`;
|
|
196
196
|
}
|
|
197
|
-
/** Check if an activity entry matches a tag filter (case-insensitive
|
|
197
|
+
/** Check if an activity entry matches a tag filter (case-insensitive, supports pipe-separated multi-tag). */
|
|
198
198
|
export function matchesTagFilter(entry, tag) {
|
|
199
199
|
if (!tag)
|
|
200
200
|
return true;
|
|
201
|
-
|
|
201
|
+
const lower = entry.tag.toLowerCase();
|
|
202
|
+
if (tag.includes("|"))
|
|
203
|
+
return tag.toLowerCase().split("|").some((t) => lower === t.trim());
|
|
204
|
+
return lower === tag.toLowerCase();
|
|
205
|
+
}
|
|
206
|
+
/** Built-in filter presets: name → pipe-separated tag pattern. */
|
|
207
|
+
export const FILTER_PRESETS = {
|
|
208
|
+
errors: "error|! action",
|
|
209
|
+
actions: "+ action|! action",
|
|
210
|
+
system: "system|status",
|
|
211
|
+
};
|
|
212
|
+
/** Resolve a filter string — expands preset names, returns raw tag otherwise. */
|
|
213
|
+
export function resolveFilterPreset(input) {
|
|
214
|
+
return FILTER_PRESETS[input.toLowerCase()] ?? input;
|
|
202
215
|
}
|
|
203
216
|
/** Format the tag filter indicator text for the separator bar. */
|
|
204
217
|
export function formatTagFilterIndicator(tag, matchCount, totalCount) {
|
|
@@ -915,9 +928,9 @@ export class TUI {
|
|
|
915
928
|
return this.searchPattern;
|
|
916
929
|
}
|
|
917
930
|
// ── Tag filter ─────────────────────────────────────────────────────────
|
|
918
|
-
/** Set or clear the tag filter. Resets scroll and repaints. */
|
|
931
|
+
/** Set or clear the tag filter. Resolves presets (e.g. "errors"). Resets scroll and repaints. */
|
|
919
932
|
setTagFilter(tag) {
|
|
920
|
-
this.filterTag = tag && tag.length > 0 ? tag : null;
|
|
933
|
+
this.filterTag = tag && tag.length > 0 ? resolveFilterPreset(tag) : null;
|
|
921
934
|
this.scrollOffset = 0;
|
|
922
935
|
this.newWhileScrolled = 0;
|
|
923
936
|
if (this.active && this.viewMode === "overview") {
|