@saadnvd1/agent-os 0.3.585 → 0.3.588
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/README.md +1 -0
- package/app/api/bookmarks/[id]/route.ts +35 -0
- package/app/api/bookmarks/route.test.ts +103 -0
- package/app/api/bookmarks/route.ts +18 -0
- package/app/api/sessions/[id]/bookmarks/route.ts +38 -0
- package/app/api/tasks/[id]/merge/route.ts +5 -1
- package/app/globals.css +1 -0
- package/app/page.tsx +16 -0
- package/components/Bookmarks/BookmarkButton.tsx +149 -0
- package/components/Bookmarks/BookmarkRow.tsx +161 -0
- package/components/Bookmarks/BookmarksDialog.tsx +186 -0
- package/components/Bookmarks/ChatBookmarks.tsx +58 -0
- package/components/Bookmarks/ChatBookmarksButton.tsx +38 -0
- package/components/Bookmarks/EmptyBookmarks.tsx +20 -0
- package/components/Bookmarks/context.ts +41 -0
- package/components/Bookmarks/helpers.test.ts +69 -0
- package/components/Bookmarks/helpers.ts +65 -0
- package/components/Bookmarks/index.ts +4 -0
- package/components/Bookmarks/useBookmarkToggle.ts +51 -0
- package/components/Chat/ChatPanel.tsx +73 -32
- package/components/Chat/Messages.test.ts +14 -9
- package/components/Chat/Messages.tsx +59 -43
- package/components/Chat/Tools.tsx +3 -1
- package/components/Chat/composer/ComposerBody.tsx +13 -5
- package/components/Chat/useLongPress.ts +43 -0
- package/components/CommandPalette/useAppCommands.ts +10 -0
- package/components/Pane/DesktopTabBar.tsx +10 -0
- package/components/Pane/MobileTabBar.tsx +10 -0
- package/components/Pane/index.tsx +8 -0
- package/components/SessionList/SidebarHeader.tsx +5 -0
- package/data/bookmarks/index.ts +2 -0
- package/data/bookmarks/keys.ts +7 -0
- package/data/bookmarks/queries.ts +146 -0
- package/data/chat/useChat.ts +4 -0
- package/data/push/topics.ts +3 -0
- package/lib/bookmarks/body.ts +23 -0
- package/lib/bookmarks/snapshot.ts +33 -0
- package/lib/bookmarks/store.ts +333 -0
- package/lib/bookmarks/types.ts +38 -0
- package/lib/chat/commands.ts +9 -5
- package/lib/db/changes.ts +3 -0
- package/lib/db/migrations.ts +28 -0
- package/lib/tasks/finish.ts +26 -4
- package/lib/tasks/move-bundle.ts +28 -0
- package/lib/tasks/move-chat.ts +10 -1
- package/lib/tasks/remote.ts +21 -3
- package/package.json +1 -1
- package/stores/bookmarksUi.ts +50 -0
- package/styles/themes.css +3 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { proxy } from "valtio";
|
|
2
|
+
|
|
3
|
+
// The Bookmarks views: every chat's (`open`, one workspace's or all), or one
|
|
4
|
+
// chat's (`chatSessionId`); the bookmark whose note is being written; and a
|
|
5
|
+
// jump waiting for its chat to be on screen.
|
|
6
|
+
export const bookmarksUi = proxy<{
|
|
7
|
+
open: boolean;
|
|
8
|
+
workspaceId: string | null;
|
|
9
|
+
chatSessionId: string | null;
|
|
10
|
+
editing: string | null;
|
|
11
|
+
jump: { sessionId: string; itemId: string; at: number } | null;
|
|
12
|
+
}>({
|
|
13
|
+
open: false,
|
|
14
|
+
workspaceId: null,
|
|
15
|
+
chatSessionId: null,
|
|
16
|
+
editing: null,
|
|
17
|
+
jump: null,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const bookmarksUiActions = {
|
|
21
|
+
open: (workspaceId: string | null = null) => {
|
|
22
|
+
bookmarksUi.workspaceId = workspaceId;
|
|
23
|
+
bookmarksUi.open = true;
|
|
24
|
+
},
|
|
25
|
+
setOpen: (open: boolean) => {
|
|
26
|
+
bookmarksUi.open = open;
|
|
27
|
+
if (!open) bookmarksUi.editing = null;
|
|
28
|
+
},
|
|
29
|
+
openChat: (sessionId: string, editing: string | null = null) => {
|
|
30
|
+
bookmarksUi.editing = editing;
|
|
31
|
+
bookmarksUi.chatSessionId = sessionId;
|
|
32
|
+
},
|
|
33
|
+
closeChat: () => {
|
|
34
|
+
bookmarksUi.chatSessionId = null;
|
|
35
|
+
bookmarksUi.editing = null;
|
|
36
|
+
},
|
|
37
|
+
edit: (id: string | null) => {
|
|
38
|
+
bookmarksUi.editing = id;
|
|
39
|
+
},
|
|
40
|
+
jump: (sessionId: string, itemId: string) => {
|
|
41
|
+
bookmarksUi.jump = { sessionId, itemId, at: Date.now() };
|
|
42
|
+
},
|
|
43
|
+
// The chat showing it takes the jump; one taken isn't taken twice.
|
|
44
|
+
takeJump: (sessionId: string): string | null => {
|
|
45
|
+
const j = bookmarksUi.jump;
|
|
46
|
+
if (!j || j.sessionId !== sessionId) return null;
|
|
47
|
+
bookmarksUi.jump = null;
|
|
48
|
+
return j.itemId;
|
|
49
|
+
},
|
|
50
|
+
};
|
package/styles/themes.css
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
--find-match: 48 96% 53% / 0.45;
|
|
29
29
|
--find-current: 25 95% 53%;
|
|
30
30
|
--find-current-foreground: 0 0% 0%;
|
|
31
|
+
/* A bookmarked item's star. */
|
|
32
|
+
--bookmark: 30 90% 40%;
|
|
31
33
|
--background: 240 10% 95.5%;
|
|
32
34
|
--foreground: 240 12% 14%;
|
|
33
35
|
--card: 0 0% 100%;
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
=========================================================================== */
|
|
293
295
|
.dark {
|
|
294
296
|
--find-match: 48 96% 53% / 0.35;
|
|
297
|
+
--bookmark: 43 96% 56%;
|
|
295
298
|
--background: 240 18% 3.5%;
|
|
296
299
|
--foreground: 240 10% 93%;
|
|
297
300
|
--card: 240 14% 6%;
|