Thread actions menu, as T3's sidebar context menu
- . or a right-click opens T3's thread menu, built by the web's buildThreadActionMenuItems - Settle, pin, snooze (server presets or a typed time), rename, regenerate title, mark unread, auto-settle, copy path/branch/thread/ID, archive, delete (confirmed), new thread on branch - Submenus open as pickers; their items are searchable from the top - Copy via OSC 52 plus the local clipboard tool - Palette group keys no longer collide for untitled groups
This commit is contained in:
1 parent
925fc15a3d
commit
43347d1d58
10 files changed
+517
-15
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { MouseEvent } from "@opentui/core";
|
||||
import { needsAttention, relativeTime, rowTime, SECTION_LABELS, statusLabel, type Section, type ThreadRow } from "../model/threads.ts";
|
||||
import type { ThreadId } from "@t3tools/contracts";
|
||||
|
||||
@@ -23,6 +24,8 @@ export function ThreadList(props: {
|
||||
readonly onFilter: (value: string) => void;
|
||||
readonly onFilterDone: () => void;
|
||||
readonly onPick: (threadId: ThreadId) => void;
|
||||
/** A right-click: the thread's menu. */
|
||||
readonly onMenu: (threadId: ThreadId) => void;
|
||||
readonly onUnfold: () => void;
|
||||
}) {
|
||||
const { rows, selected, focused, width, height, now } = props;
|
||||
@@ -56,7 +59,7 @@ export function ThreadList(props: {
|
||||
paddingLeft={1}
|
||||
paddingRight={1}
|
||||
backgroundColor={isSelected ? (focused ? colors.selectedBg : colors.panel) : "transparent"}
|
||||
onMouseDown={() => props.onPick(row.thread.id)}
|
||||
onMouseDown={(event: MouseEvent) => (event.button === 2 ? props.onMenu(row.thread.id) : props.onPick(row.thread.id))}
|
||||
>
|
||||
<box flexDirection="row">
|
||||
<text fg={colors.faint}>{left}</text>
|
||||
|
||||
Reference in new issue
Block a user