Ship Assistent 0.11.3: variants grid, EN Krea prep, and stream fence fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-22 04:58:03 +03:00
co-authored by Cursor
parent 036484c7b7
commit 56e089d8da
18 changed files with 10244 additions and 9218 deletions
+136
View File
@@ -5,6 +5,7 @@
min-height: 28rem;
padding: 0.5rem 0.65rem 0.65rem;
box-sizing: border-box;
position: relative;
}
.sa-gate {
@@ -1847,6 +1848,137 @@
align-items: center;
}
.sa-board.sa-board-variants {
grid-template-columns: 1fr 1fr;
grid-auto-rows: minmax(7.5rem, 1fr);
}
.sa-slot.sa-slot-gen-result .sa-slot-open {
appearance: none;
border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
background: color-mix(in srgb, currentColor 10%, transparent);
color: inherit;
border-radius: 999px;
padding: 0.05rem 0.45rem;
font-size: 0.68rem;
cursor: pointer;
margin-left: auto;
opacity: 0.85;
}
.sa-slot.sa-slot-gen-result .sa-slot-open:hover {
opacity: 1;
}
.sa-lightbox {
position: absolute;
inset: 0;
z-index: 80;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.sa-lightbox[hidden] {
display: none !important;
}
.sa-lightbox-backdrop {
position: absolute;
inset: 0;
background: color-mix(in srgb, #000 62%, transparent);
}
.sa-lightbox-panel {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 0.45rem;
width: min(96%, 52rem);
max-height: 94%;
padding: 0.55rem 0.65rem 0.65rem;
border-radius: 0.65rem;
border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
background: color-mix(in srgb, Canvas 92%, transparent);
box-shadow: 0 12px 40px color-mix(in srgb, #000 35%, transparent);
}
.sa-lightbox-head {
display: flex;
align-items: center;
gap: 0.45rem;
}
.sa-lightbox-title {
font-weight: 650;
font-size: 0.9rem;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sa-lightbox-idx {
font-size: 0.75rem;
opacity: 0.7;
}
.sa-lightbox-body {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 12rem;
flex: 1;
overflow: hidden;
}
.sa-lightbox-body img {
max-width: 100%;
max-height: min(70vh, 36rem);
object-fit: contain;
border-radius: 0.35rem;
}
.sa-lightbox-nav {
appearance: none;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 2rem;
height: 2.4rem;
border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
border-radius: 0.4rem;
background: color-mix(in srgb, Canvas 80%, transparent);
color: inherit;
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
opacity: 0.85;
}
.sa-lightbox-nav:hover {
opacity: 1;
}
.sa-lightbox-prev {
left: 0.25rem;
}
.sa-lightbox-next {
right: 0.25rem;
}
.sa-lightbox-actions {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
justify-content: flex-end;
}
@media (max-width: 900px) {
.sa-layout {
flex-direction: column;
@@ -1872,4 +2004,8 @@
border-right: none;
border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.sa-lightbox-panel {
width: 98%;
max-height: 96%;
}
}
+9391 -8671
View File
File diff suppressed because it is too large Load Diff
+45 -1
View File
@@ -16,6 +16,7 @@ window.SA = window.SA || {};
'clear_prompt_images', 'slot_to_prompt_image', 'pack',
'memories', 'memory_query', 'memory_kind', 'tag_query', 'user_prefs',
'controls', 'persona_clone', 'persona_shelves', 'persona', 'notes',
'variants',
];
const FENCE_RE = /```(?:json)?\s*([\s\S]*?)```/gi;
@@ -92,10 +93,53 @@ window.SA = window.SA || {};
return { prose, patch: lastPatch };
}
/**
* Closed fence worth freezing the stream / stopping Ollama early.
* Weak fences (pack / creativity / empty) must NOT stop — model often continues with the real patch.
*/
function isTerminalStreamPatch(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
if (isCardObject(obj)) {
return true;
}
if (Array.isArray(obj.variants) && obj.variants.length) {
return true;
}
if (obj.look_at != null || obj.vision_from != null || obj.vision_slots != null) {
return true;
}
if (obj.search_query != null || obj.civitai_query != null
|| obj.memory_query != null || obj.tag_query != null || obj.inventory_query != null) {
return true;
}
const acts = Array.isArray(obj.actions) ? obj.actions.map(String) : [];
const hopOrGen = [
'skill_load', 'persona_read', 'memory_get', 'memory_search', 'lookup_tags',
'list_inventory', 'search_civitai', 'interrupt', 'generate',
'memory_upsert', 'user_pref_upsert',
];
if (acts.some((a) => hopOrGen.includes(a))) {
return true;
}
if (String(obj.prompt || '').trim().length >= 48) {
return true;
}
if (obj.loras != null || obj.aspect != null || obj.steps != null
|| obj.width != null || obj.height != null || obj.cfg != null
|| obj.seed != null || obj.controls != null
|| obj.memories != null || obj.user_prefs != null) {
return true;
}
return false;
}
SA.PATCH_KEYS = PATCH_KEYS;
SA.isCardObject = isCardObject;
SA.isPatchObject = isPatchObject;
SA.isTerminalStreamPatch = isTerminalStreamPatch;
SA.normalizePatch = normalizePatch;
SA.extractPatch = extractPatch;
})();