korrespond v1 premiere: Bedrock routing, engine picker, journal auto-save + status
- KorrespondAgent: add resolveDeployment() helper; fix classify/translate to use
Haiku via Bedrock, draft to use Haiku (quick) or Sonnet (thorough) — fixes broken
withDeployment('gpt-4o-mini') calls when DBN_BEDROCK_ENABLED=true
- korrespond.php: add Quick/Thorough engine picker (case_toggle already present)
- korrespond.js: pass engine in request payload
- api/korrespond.php: accept user-selected engine, auto-save to case_tool_results
for paid users after each successful run, update deployment log label
- CaseResults: add korr_status to listForUser SELECT, add updateStatus() method
- result-action.php: add set_status action for correspondence journal
- account.php: show status dropdown (Draft/Sent/Reply received/Resolved) for
korrespond entries in #analyses, wire JS change handler to result-action.php
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+18
@@ -935,6 +935,14 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
|
||||
<?php if (!empty($r['used_case_context'])): ?>
|
||||
· <span style="background:#dbeafe;color:#1e3a8a;padding:1px 8px;border-radius:999px;font-size:.75rem;font-weight:600;"><?= htmlspecialchars($l['used_case_badge']) ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($r['tool'] === 'korrespond'): ?>
|
||||
· <select class="korr-status-select" data-id="<?= (int)$r['id'] ?>" style="font-size:.8rem;padding:1px 4px;border-radius:4px;border:1px solid #d1d5db;background:#fff;cursor:pointer;">
|
||||
<option value="draft" <?= ($r['korr_status'] ?? 'draft') === 'draft' ? 'selected' : '' ?>>Draft</option>
|
||||
<option value="sent" <?= ($r['korr_status'] ?? '') === 'sent' ? 'selected' : '' ?>>Sent</option>
|
||||
<option value="replied" <?= ($r['korr_status'] ?? '') === 'replied' ? 'selected' : '' ?>>Reply received</option>
|
||||
<option value="resolved" <?= ($r['korr_status'] ?? '') === 'resolved' ? 'selected' : '' ?>>Resolved</option>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="acct-result-actions">
|
||||
@@ -1164,6 +1172,16 @@ window.ACCT_L = <?= json_encode($l, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLAS
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.korr-status-select').forEach(function (sel) {
|
||||
sel.addEventListener('change', function () {
|
||||
fetch('/api/case/result-action.php', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ action: 'set_status', id: parseInt(sel.getAttribute('data-id'), 10), status: sel.value })
|
||||
}).catch(function () {});
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.acct-result-delete').forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
if (!confirm(window.ACCT_L.confirm_delete_analysis)) return;
|
||||
|
||||
Reference in New Issue
Block a user