PROMPT.md-based skill injection, scroll-on-image-load fix, skill availability UI
- SkillService: read PROMPT.md instead of SKILL.md for system prompt injection - SkillInfo: add HasPromptMd field, skills without PROMPT.md are not injectable - Agent form: disable checkbox + warning for skills missing PROMPT.md - Thumbnail size: 320px (was 300px) - Chat: _scrollOnImages() re-scrolls after lazy-loaded images finish loading - CSS: skill-unavailable/warning styling, adjusted thumb dimensions
This commit is contained in:
1 parent
8d86406037
commit
40e56acc30
6 files changed
+46
-15
No files matched your search
@@ -79,6 +79,16 @@ function scrollDown() {
|
||||
});
|
||||
}
|
||||
|
||||
function _scrollOnImages(container) {
|
||||
var imgs = container.querySelectorAll('img');
|
||||
for (var i = 0; i < imgs.length; i++) {
|
||||
if (!imgs[i].complete) {
|
||||
imgs[i].addEventListener('load', scrollDown);
|
||||
imgs[i].addEventListener('error', scrollDown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function esc(s) {
|
||||
const d = document.createElement('div');
|
||||
d.textContent = s;
|
||||
@@ -234,6 +244,7 @@ function addAssistantBubble(text, timestamp = '', messageId = null, isMarked = f
|
||||
if (messageId) div.dataset.messageId = messageId;
|
||||
div.innerHTML = renderMarkdown(text);
|
||||
wrapKreaGalleries(div);
|
||||
_scrollOnImages(div);
|
||||
_addReplyButton(div);
|
||||
_addMarkButton(div, messageId, isMarked);
|
||||
chatEl().appendChild(div);
|
||||
@@ -299,6 +310,7 @@ function endStreamBubble() {
|
||||
else {
|
||||
_streamDiv.innerHTML = renderMarkdown(_streamText);
|
||||
wrapKreaGalleries(_streamDiv);
|
||||
_scrollOnImages(_streamDiv);
|
||||
}
|
||||
}
|
||||
_streamDiv = null;
|
||||
|
||||
Reference in new issue
Block a user