mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-07 05:58:37 -04:00
Slash-command replies and the echoed /setup command are persisted to session history so they render in the transcript, but they are UI chatter the user never meant as conversation. They were sent to the model on the next turn, which then commented on '/setup ...' and exposed transient values (e.g. the Copilot device user_code) to the LLM. - get_context_messages() (the LLM-API view) now skips messages tagged metadata.source == 'slash'. Display/history-load paths use raw history and are unaffected. - slashCommands.js tags the echoed user command with source:'slash' too (the assistant replies already carried it); the user line was the one untagged path that still reached context. Fixes #2634.
This commit is contained in:
committed by
GitHub
parent
db6136baa3
commit
b4a0700da4
@@ -5880,7 +5880,9 @@ async function handleSlashCommand(input) {
|
||||
let args = parts.slice(1);
|
||||
const ctx = _makeCtx();
|
||||
let _userShown = false;
|
||||
function _showUser() { if (!_userShown) { _userShown = true; _addMessage('user', input); _persistMsg('user', input); } }
|
||||
// Tag the echoed command with source:'slash' so it renders in the transcript
|
||||
// but is excluded from LLM context (get_context_messages), like the replies.
|
||||
function _showUser() { if (!_userShown) { _userShown = true; _addMessage('user', input); _persistMsg('user', input, { source: 'slash' }); } }
|
||||
|
||||
try {
|
||||
// --- Check for --help / -h on any command ---
|
||||
|
||||
Reference in New Issue
Block a user