email syncyng

This commit is contained in:
2026-02-26 01:39:38 +00:00
parent 5d4f0114cd
commit 42abb97d7b
22 changed files with 1422 additions and 348 deletions
@@ -78,6 +78,7 @@ export function useEmbeddableChat(params: UseEmbeddableChatParams) {
if (prefix) prompt = `${prefix}${prompt}`;
const cwdForFirst = !sessionId ? cwd : undefined;
const displayText = promptPrefix ? text : undefined;
sendPrompt(
prompt,
!sessionId && ids.length > 0 ? ids : undefined,
@@ -86,6 +87,7 @@ export function useEmbeddableChat(params: UseEmbeddableChatParams) {
undefined,
sandboxed,
thinkingLevel,
displayText,
);
attachmentManager.clearAttachments();
@@ -267,13 +267,14 @@ export function usePiChat(initialSessionId?: string, initialModel?: string | nul
groupSlug?: string | null,
sandboxed?: boolean,
thinking?: string | null,
displayText?: string,
) {
// Mark session as started on first message
if (!hasStarted) {
setHasStarted(true);
}
setMessages((prev) => [...prev, { role: 'user', text, ...(images?.length ? { images } : {}) }]);
setMessages((prev) => [...prev, { role: 'user', text: displayText ?? text, ...(images?.length ? { images } : {}) }]);
setIsGenerating(true);
streamingRef.current = '';
setStreamingText('');
+2
View File
@@ -7,6 +7,8 @@ export type EmailSummary = {
snippet: string;
attachmentCount?: number;
read?: boolean;
fromDomain?: string;
labels?: string[];
};
export type EmailMessage = EmailSummary & {