email syncyng
This commit is contained in:
@@ -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('');
|
||||
|
||||
@@ -7,6 +7,8 @@ export type EmailSummary = {
|
||||
snippet: string;
|
||||
attachmentCount?: number;
|
||||
read?: boolean;
|
||||
fromDomain?: string;
|
||||
labels?: string[];
|
||||
};
|
||||
|
||||
export type EmailMessage = EmailSummary & {
|
||||
|
||||
Reference in New Issue
Block a user