fix(email): retain paperclip files when resetting the input

This commit is contained in:
red person
2026-10-28 07:26:05 +03:00
parent a646b59110
commit 0f8b137713
10 changed files with 66 additions and 11 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import presetsModule from './js/presets.js?v=20260908personaname1';
import searchModule from './js/search.js';
import chatModule from './js/chat.js?v=20260917toolttft1';
import compareModule from './js/compare/index.js?v=20260909mobilepaneaddscroll1';
import documentModule from './js/document.js?v=20260916docctx2';
import documentModule from './js/document.js?v=20261028emailpickerfiles1';
import searchChatModule from './js/search-chat.js';
import { makeWindowDraggable } from './js/windowDrag.js';
import {
+1 -1
View File
@@ -2682,7 +2682,7 @@
<script type="module" src="/static/js/search.js"></script>
<script type="module" src="/static/js/spinner.js"></script>
<script type="module" src="/static/js/tts-ai.js"></script>
<script type="module" src="/static/js/document.js?v=20260916docctx2"></script>
<script type="module" src="/static/js/document.js?v=20261028emailpickerfiles1"></script>
<script type="module" src="/static/js/gallery.js?v=20260910promptcopy1"></script>
<script type="module" src="/static/js/chatRenderer.js?v=20260914metricssummary1"></script>
<script type="module" src="/static/js/codeRunner.js?v=20260831richtexttools91"></script>
+1 -1
View File
@@ -16,7 +16,7 @@ import spinnerModule from './spinner.js';
import presetsModule from './presets.js?v=20260908personaname1';
import fileHandlerModule from './fileHandler.js?v=20260909mobileattachmentedit1';
import searchModule from './search.js';
import documentModule from './document.js?v=20260916docctx2';
import documentModule from './document.js?v=20261028emailpickerfiles1';
import * as emailInbox from './emailInbox.js?v=20260914aireply4';
import codeRunnerModule from './codeRunner.js?v=20260831richtexttools91';
import slashCommands, { initSlashCommands, isCommand, handleSlashCommand, handleSetupInput, handleSetupWizard, typewriterInto } from './slashCommands.js?v=20260921chatgptusage1';
+2 -2
View File
@@ -1889,7 +1889,7 @@ function _activateEntityAnchor(e, forcedAnchor = null) {
} catch {}
});
} else if (kind === 'document') {
import('./document.js?v=20260916docctx2').then(mod => {
import('./document.js?v=20261028emailpickerfiles1').then(mod => {
const open = mod.loadDocument
|| mod.openDocument
|| (mod.default && (mod.default.loadDocument || mod.default.openDocument));
@@ -3656,7 +3656,7 @@ export function addMessage(role, content, modelName, metadata) {
b.querySelectorAll('[data-doc-edit-ref]').forEach(button => {
button.addEventListener('click', () => {
import('./document.js?v=20260916docctx2').then(mod => {
import('./document.js?v=20261028emailpickerfiles1').then(mod => {
const restore = mod.restoreSelectionReference
|| mod.default?.restoreSelectionReference;
return restore?.(button.dataset.docEditRef || '', {
+1 -1
View File
@@ -7,7 +7,7 @@ import Storage from './storage.js';
import themeModule from './theme.js?v=20260911organsrain1';
import markdownModule from './markdown.js';
import sessionModule from './sessions.js';
import documentModule from './document.js?v=20260916docctx2';
import documentModule from './document.js?v=20261028emailpickerfiles1';
// Tool approvals are control-plane submits for the current chat. chat.js
// deliberately leaves the composer untouched, then programmatically clicks the
+1 -1
View File
@@ -5197,7 +5197,7 @@ import { attachColorPicker } from './colorPicker.js?v=20260910eyedropper1';
}
async function _handleAttachUpload(e) {
const files = e.target.files;
const files = Array.from(e.target.files || []);
e.target.value = ''; // reset for next upload
await _uploadComposeFiles(files);
}
+1 -1
View File
@@ -187,7 +187,7 @@ function _wireAttachmentHandlers(reader, folder) {
ownerModal.classList.add('hidden');
}
}
const docMod = await import('../document.js?v=20260916docctx2');
const docMod = await import('../document.js?v=20261028emailpickerfiles1');
const load = (docMod && docMod.loadDocument) || (docMod && docMod.default && docMod.default.loadDocument);
if (typeof load === 'function') {
await load(json.doc_id);
+1 -1
View File
@@ -16,7 +16,7 @@ import modelsModule from './models.js';
import chatRenderer from './chatRenderer.js?v=20260914metricssummary1';
import spinnerModule from './spinner.js';
import themeModule from './theme.js?v=20260911organsrain1';
import documentModule from './document.js?v=20260916docctx2';
import documentModule from './document.js?v=20261028emailpickerfiles1';
import workspaceModule from './workspace.js';
import settingsModule from './settings.js?v=20260912writingstyle3';
import cookbookModule from './cookbook.js';
+2 -2
View File
@@ -7,7 +7,7 @@
// - Other static assets (images/fonts/libs): cache-first with bg refresh.
// - API / non-GET: never cached.
// Bump CACHE_NAME whenever the precache list or SW logic changes.
const CACHE_NAME = 'odysseus-v659-notes-reference';
const CACHE_NAME = 'odysseus-v660-email-picker-files';
// KaTeX resolves these from its own stylesheet, so caching the CSS without them
// gives offline math fallback glyphs instead of proper typesetting.
@@ -80,7 +80,7 @@ const PRECACHE = [
'/static/js/search.js',
'/static/js/spinner.js',
'/static/js/tts-ai.js',
'/static/js/document.js?v=20260916docctx2',
'/static/js/document.js?v=20261028emailpickerfiles1',
'/static/js/gallery.js?v=20260910promptcopy1',
'/static/js/chatRenderer.js?v=20260914metricssummary1',
'/static/js/codeRunner.js?v=20260831richtexttools91',