mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
promp and clear command
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Chat Service Orchestrator
|
||||
// Purpose: Composes chat submodules into the public service API and boots socket/event wiring.
|
||||
// Scope: Keeps external chat contracts stable while delegating logic to focused modules.
|
||||
const { history } = require('./state');
|
||||
const { history, clearHistory } = require('./state');
|
||||
const { normalizeUserText } = require('./contentFilters');
|
||||
const { buildMessage, buildTypingPayload } = require('./contextBuilders');
|
||||
const { broadcastMessage, getRecentMessages } = require('./broadcast');
|
||||
@@ -37,4 +37,5 @@ module.exports = {
|
||||
buildTypingPayload,
|
||||
sendSystemMessage,
|
||||
getRecentMessages,
|
||||
clearHistory,
|
||||
};
|
||||
|
||||
@@ -40,6 +40,12 @@ function setLastAccessNoticeAt(ts) {
|
||||
lastAccessNoticeAt = ts;
|
||||
}
|
||||
|
||||
function clearHistory() {
|
||||
history.length = 0;
|
||||
lastMessageBySocket.clear();
|
||||
typingBySocket.clear();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
rateBuckets,
|
||||
history,
|
||||
@@ -50,4 +56,5 @@ module.exports = {
|
||||
getRecentMessages,
|
||||
getLastAccessNoticeAt,
|
||||
setLastAccessNoticeAt,
|
||||
clearHistory,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user