Put the assistant on the Partnership tab

A partnership question gets asked while looking at this page; sending someone to another tab to ask it loses the context they are looking at.
This commit is contained in:
Gmer4Lfe
2026-08-17 14:38:04 -04:00
parent bce3bf61e9
commit 90f3b0b7da
+37
View File
@@ -36,6 +36,13 @@
// api/run.php long-running deploy operations
// api/confform.php inline conf edits
require_once dirname(__DIR__) . '/include/confui.php';
require_once dirname(__DIR__) . '/include/ai_chat.php';
// Same shared surface the AI tab and the Monitor row use, gated the same way. A partnership
// question — why a sync is behind, what a tier covers, whether the mirror is current — is asked
// while looking at this page, and sending someone to another tab to ask it loses the context
// they are looking at.
if (vv_ai_ui_on()) vv_ai_chat_assets();
?>
<style>
.vv-pt-grid { display:grid; gap:12px; }
@@ -131,6 +138,22 @@ textarea.vv-pt-set-input { resize:vertical; white-space:pre; }
</div>
</div>
<!-- Assistant -->
<?php if (vv_ai_ui_on()): ?>
<div class="vv-card" id="vv-pt-ai-card" style="margin-bottom:12px;">
<?php vv_ai_chat_markup('vv-pt-ai', [
'profile' => 'chat',
'compact' => true,
'title' => 'Assistant',
'height' => '300px',
'tall' => '500px',
'tallLarge' => '750px',
'empty' => 'Ask about the partnership — sync state, fallback tiers, what the mirror '
. 'is running, why a transfer moved nothing.',
]); ?>
</div>
<?php endif; ?>
<!-- Settings -->
<div class="vv-card" id="vv-pt-settings-card" style="margin-top:12px;">
<div style="display:flex;justify-content:space-between;align-items:center;cursor:pointer;"
@@ -1462,5 +1485,19 @@ _vvPtReload = vvPtLoad; // expose to top-level toggle fns
vvPtLoad();
setInterval(vvPtLoad, 10000);
// ── Assistant ─────────────────────────────────────────────────────────────────
// resumeProfile pins this card to General Chat. Without it the surface resumes whatever thread
// was last touched anywhere in the UI, so opening the Partnership tab could land mid-way through
// an unrelated Scheduler conversation, on a card with no picker to get back from.
if (typeof VvAiChat === 'function' && document.getElementById('vv-pt-ai-chat')) {
VvAiChat({
prefix: 'vv-pt-ai',
profile: 'chat',
resumeProfile: 'chat',
empty: 'Ask about the partnership — sync state, fallback tiers, what the mirror is running, '
+ 'why a transfer moved nothing.',
});
}
})();
</script>