MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / saveCurrentSessionScrollPosition

Method saveCurrentSessionScrollPosition

chat/app.js:1009–1021  ·  view source on GitHub ↗

* Saves the current session's scroll position in-memory for this tab.

()

Source from the content-addressed store, hash-verified

1007 sessionId: session.id,
1008 requestId: message.id,
1009 usage: { ...usage, model: usage?.model || message.model },
1010 kind
1011 });
1012 if (metadata) Object.assign(message, metadata);
1013 }
1014
1015 async tryRecordRuntimeUsage(data) {
1016 try { return await this.runtime.recordUsage?.(data); }
1017 catch (error) {
1018 // Accounting is an estimate. A storage failure must never replace
1019 // a successful response or turn cancellation into a stream error.
1020 console.warn('Could not save the local usage estimate:', error?.message || 'Storage unavailable');
1021 return null;
1022 }
1023 }
1024

Callers 7

switchSessionMethod · 0.95
clearCurrentSessionMethod · 0.95
renderMethod · 0.80

Calls 1

setMethod · 0.80

Tested by

no test coverage detected