refac
This commit is contained in:
1 parent
d864669b59
commit
c4c4ab57e3
5 files changed
+41
-4
No files matched your search
@@ -136,6 +136,7 @@
|
||||
|
||||
let loading = true;
|
||||
$: chatContainerId = embedded ? 'note-chat-container' : 'chat-container';
|
||||
$: messageInputDropzoneId = embedded ? 'note-chat-input-dropzone' : 'chat-pane';
|
||||
const embeddedSuggestedPrompts = [
|
||||
'Enhance this note and update it.',
|
||||
'Summarize this note.',
|
||||
@@ -3750,7 +3751,10 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class=" pb-2 {dragged ? 'z-0' : 'z-10'}">
|
||||
<div
|
||||
id={embedded ? messageInputDropzoneId : undefined}
|
||||
class=" pb-2 {dragged ? 'z-0' : 'z-10'}"
|
||||
>
|
||||
<MessageInput
|
||||
bind:this={messageInput}
|
||||
{history}
|
||||
@@ -3769,6 +3773,7 @@
|
||||
bind:atSelectedModel
|
||||
bind:showCommands
|
||||
bind:dragged
|
||||
dropzoneId={messageInputDropzoneId}
|
||||
chatId={$chatId}
|
||||
{contextUsage}
|
||||
compactHandler={handleManualCompact}
|
||||
@@ -3862,7 +3867,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb-2 z-10">
|
||||
<div id={embedded ? messageInputDropzoneId : undefined} class="pb-2 z-10">
|
||||
<MessageInput
|
||||
bind:this={messageInput}
|
||||
{history}
|
||||
@@ -3881,6 +3886,7 @@
|
||||
bind:atSelectedModel
|
||||
bind:showCommands
|
||||
bind:dragged
|
||||
dropzoneId={messageInputDropzoneId}
|
||||
chatId={$chatId}
|
||||
{contextUsage}
|
||||
compactHandler={handleManualCompact}
|
||||
|
||||
@@ -507,6 +507,7 @@
|
||||
let showInputModal = false;
|
||||
|
||||
export let dragged = false;
|
||||
export let dropzoneId = 'chat-pane';
|
||||
let shiftKey = false;
|
||||
|
||||
let user = null;
|
||||
@@ -1216,7 +1217,7 @@
|
||||
await tick();
|
||||
if (isDestroyed) return;
|
||||
|
||||
dropzoneElement = document.getElementById('chat-pane');
|
||||
dropzoneElement = document.getElementById(dropzoneId);
|
||||
if (dropzoneElement) {
|
||||
dropzoneElement.addEventListener('dragover', onDragOver, true);
|
||||
dropzoneElement.addEventListener('drop', onDrop, true);
|
||||
|
||||
Reference in new issue
Block a user