Skip to content

Commit 7544ce0

Browse files
authored
Feat: add commands, refactor editor (#356)
1 parent 5f90f6a commit 7544ce0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2125
-3298
lines changed

apps/array/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@vitest/ui": "^4.0.10",
5353
"autoprefixer": "^10.4.17",
5454
"electron": "^30.0.0",
55+
"fuse.js": "^7.1.0",
5556
"husky": "^9.1.7",
5657
"jsdom": "^26.0.0",
5758
"lint-staged": "^15.5.2",
@@ -100,16 +101,13 @@
100101
"@radix-ui/themes": "^3.2.1",
101102
"@tanstack/react-query": "^5.90.2",
102103
"@tanstack/react-virtual": "^3.13.12",
103-
"@tiptap/core": "^3.11.0",
104-
"@tiptap/extension-link": "^3.11.0",
105-
"@tiptap/extension-mention": "^3.11.0",
106-
"@tiptap/extension-placeholder": "^3.11.0",
107-
"@tiptap/extension-typography": "^3.11.0",
108-
"@tiptap/extension-underline": "^3.11.0",
109-
"@tiptap/pm": "^3.11.0",
110-
"@tiptap/react": "^3.11.0",
111-
"@tiptap/starter-kit": "^3.11.0",
112-
"@tiptap/suggestion": "^3.11.0",
104+
"@tiptap/core": "^3.13.0",
105+
"@tiptap/extension-mention": "^3.13.0",
106+
"@tiptap/extension-placeholder": "^3.13.0",
107+
"@tiptap/pm": "^3.13.0",
108+
"@tiptap/react": "^3.13.0",
109+
"@tiptap/starter-kit": "^3.13.0",
110+
"@tiptap/suggestion": "^3.13.0",
113111
"@trpc/client": "^11.8.0",
114112
"@trpc/react-query": "^11.8.0",
115113
"@trpc/server": "^11.8.0",
@@ -127,8 +125,8 @@
127125
"electron-store": "^11.0.0",
128126
"file-icon": "^6.0.0",
129127
"idb-keyval": "^6.2.2",
130-
"inversify": "^7.10.6",
131128
"immer": "^11.0.1",
129+
"inversify": "^7.10.6",
132130
"is-glob": "^4.0.3",
133131
"micromatch": "^4.0.5",
134132
"node-addon-api": "^8.5.0",
@@ -146,6 +144,7 @@
146144
"reflect-metadata": "^0.2.2",
147145
"remark-gfm": "^4.0.1",
148146
"sonner": "^2.0.7",
147+
"tippy.js": "^6.3.7",
149148
"trpc-electron": "^0.1.2",
150149
"uuid": "^9.0.1",
151150
"vscode-icons-js": "^11.6.1",

apps/array/src/main/services/agent/service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
PROTOCOL_VERSION,
1010
type RequestPermissionRequest,
1111
type RequestPermissionResponse,
12-
type SessionNotification,
1312
} from "@agentclientprotocol/sdk";
1413
import { Agent, type OnLogCallback } from "@posthog/agent";
1514
import { app } from "electron";
@@ -550,8 +549,8 @@ export class AgentService extends TypedEventEmitter<AgentServiceEvents> {
550549
};
551550
},
552551

553-
async sessionUpdate(_params: SessionNotification): Promise<void> {
554-
// No-op: session/update notifications are captured by the stream tap
552+
async sessionUpdate() {
553+
// session/update notifications flow through the tapped stream
555554
},
556555

557556
extNotification: async (

apps/array/src/renderer/components/ThemeWrapper.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
import { Theme } from "@radix-ui/themes";
22
import { useThemeStore } from "@stores/themeStore";
33
import type React from "react";
4+
import { useEffect, useRef } from "react";
5+
6+
let portalContainer: HTMLDivElement | null = null;
7+
8+
export function getPortalContainer(): HTMLElement {
9+
return portalContainer ?? document.body;
10+
}
411

512
export function ThemeWrapper({ children }: { children: React.ReactNode }) {
613
const isDarkMode = useThemeStore((state) => state.isDarkMode);
14+
const portalRef = useRef<HTMLDivElement>(null);
15+
16+
useEffect(() => {
17+
portalContainer = portalRef.current;
18+
return () => {
19+
portalContainer = null;
20+
};
21+
}, []);
722

823
return (
924
<Theme
@@ -15,6 +30,7 @@ export function ThemeWrapper({ children }: { children: React.ReactNode }) {
1530
scaling="100%"
1631
>
1732
{children}
33+
<div ref={portalRef} id="portal-container" />
1834
</Theme>
1935
);
2036
}

apps/array/src/renderer/features/editor/components/FileMentionList.tsx

Lines changed: 0 additions & 197 deletions
This file was deleted.

0 commit comments

Comments
 (0)