feat: show the conversation evidence behind each learning trajectory
Reviewers were asked to include or exclude learning trajectories while only seeing metadata — credit class, confidence, status. The decisions and their redacted context turns were already captured and stored, but no endpoint returned them, so the evidence was unreachable from the UI. Add GET /api/learning/trajectories/:id and an expandable row on the learning page that fetches on demand. Also widen SentMessageSchema to accept matrixEventId, imageOutcomeCredit and imageOutcomeAt. The learning loop added these to SentMessageRecord and they flow out of /api/messages, but the strict contract rejected them, breaking the dashboard. Enable generation with shadow mode off so eligible examples reach reply prompts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
687abab82b
commit
142378df33
25 files changed
+836
-28
No files matched your search
@@ -158,5 +158,27 @@ export function createLoginRouter(ctx: WebContext): Router {
|
||||
}
|
||||
});
|
||||
|
||||
router.delete('/accounts/:accountId', async (req, res) => {
|
||||
const accounts = ctx.services.redditAccounts;
|
||||
if (!accounts) {
|
||||
res.status(503).json({ ok: false, error: 'Reddit account service not initialised' });
|
||||
return;
|
||||
}
|
||||
const accountId = decodeURIComponent(req.params.accountId);
|
||||
try {
|
||||
const account = await accounts.remove(accountId);
|
||||
ctx.logger.info(`Removed Reddit account u/${account.redditUsername} and the content it owned`);
|
||||
res.json({ ok: true, account });
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : 'Could not remove Reddit account';
|
||||
if (message === 'Reddit account not found') {
|
||||
res.status(404).json({ ok: false, error: message });
|
||||
return;
|
||||
}
|
||||
ctx.logger.error('Failed to remove Reddit account:', error);
|
||||
res.status(500).json({ ok: false, error: message });
|
||||
}
|
||||
});
|
||||
|
||||
return router;
|
||||
}
|
||||
Reference in new issue
Block a user