fix: remove reopen-image-history UI, trim budget label, image-storage preflight now passes with scoped ListBucket
This commit is contained in:
parent
2dbb446a9c
commit
be889567f5
1 changed files with 2 additions and 19 deletions
|
|
@ -90,23 +90,6 @@ import {
|
||||||
|
|
||||||
bindExampleButtons(document);
|
bindExampleButtons(document);
|
||||||
loadSavedChats();
|
loadSavedChats();
|
||||||
var historyButton = document.createElement('button');
|
|
||||||
historyButton.type = 'button'; historyButton.textContent = 'Reopen image history';
|
|
||||||
imageBtn.parentNode.appendChild(historyButton);
|
|
||||||
historyButton.addEventListener('click', function() {
|
|
||||||
var owner;
|
|
||||||
try { owner = captureSharingOwner(); } catch (_) { return; }
|
|
||||||
imageJson('/api/image-jobs/clinical_assistant', {}, owner).then(function(data) {
|
|
||||||
assertSharingOwner(owner);
|
|
||||||
var out = document.getElementById('assistant-visual-output'); out.replaceChildren();
|
|
||||||
renderImageJobs(out, data.jobs, 'clinical_assistant', function(card, image) {
|
|
||||||
card.insertAdjacentHTML('beforeend', imageStore.renderGeneratedImage(image.imageUrl, 'Generated teaching visual', image.downloadUrl));
|
|
||||||
var use = document.createElement('button'); use.type = 'button'; use.textContent = 'Include in saved chat';
|
|
||||||
use.onclick = function() { if (!validSharingOwner(owner) || !card.isConnected) return; generatedImageJobs = [{ jobId: image.jobId }]; lastGeneratedImageSrc = image.imageUrl; exporter.invalidate(); };
|
|
||||||
card.appendChild(use);
|
|
||||||
});
|
|
||||||
}).catch(function(e) { if (validSharingOwner(owner) && e.name !== 'AbortError') showToast(e.message, 'error'); });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadStatus() {
|
function loadStatus() {
|
||||||
|
|
@ -862,8 +845,8 @@ import {
|
||||||
var used = conversationSize(input ? input.value : '');
|
var used = conversationSize(input ? input.value : '');
|
||||||
var label = document.getElementById('assistant-context-budget');
|
var label = document.getElementById('assistant-context-budget');
|
||||||
if (label) label.textContent = used.toLocaleString() + (conversationChars === null ?
|
if (label) label.textContent = used.toLocaleString() + (conversationChars === null ?
|
||||||
' conversation characters (UTF-16 code units; includes your draft). Limit unavailable; the server must validate each request.' :
|
' conversation characters (UTF-16 code units). Limit unavailable; the server must validate each request.' :
|
||||||
' / ' + conversationChars.toLocaleString() + ' conversation characters (UTF-16 code units; includes your draft).');
|
' / ' + conversationChars.toLocaleString() + ' conversation characters (UTF-16 code units).');
|
||||||
var warning = document.getElementById('assistant-context-warning');
|
var warning = document.getElementById('assistant-context-warning');
|
||||||
if (warning) {
|
if (warning) {
|
||||||
warning.hidden = conversationChars === null || used * 10 < conversationChars * 9;
|
warning.hidden = conversationChars === null || used * 10 < conversationChars * 9;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue