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

Method stopCurrentSessionStreamingAndWait

chat/app.js:3683–3705  ·  view source on GitHub ↗

* Interrupts the current session stream and waits for cleanup to finish. * Timeline-mutating actions use this so they can safely restart generation. * @param {Object} options * @param {number} options.timeoutMs - Max wait time before giving up * @returns {Promise } True i

(options = {})

Source from the content-addressed store, hash-verified

3681
3682 try {
3683 await shareService.deleteShare(session.shareInfo.shareId, session.shareInfo.token);
3684
3685 // Clear share info from session
3686 delete session.shareInfo;
3687 await chatDB.saveSession(session);
3688
3689 this.showToast('Share deleted', 'success');
3690
3691 // Re-render sidebar to update button labels
3692 this.renderSessions();
3693
3694 } catch (error) {
3695 console.error('Failed to delete share:', error);
3696 this.showToast(error.message || 'Failed to delete share', 'error');
3697 }
3698 }
3699
3700 /**
3701 * Show share management modal with status, actions, and settings
3702 */
3703 async showShareManagementModal() {
3704 const session = this.getCurrentSession();
3705 if (!session) return;
3706
3707 const messages = await chatDB.getSessionMessages(session.id);
3708 this.ui.shareModals.showManagementModal(session, messages, {

Callers 3

confirmEditPromptMethod · 0.95
handleResendMessageMethod · 0.80

Calls 4

getCurrentSessionMethod · 0.95
showToastMethod · 0.95

Tested by

no test coverage detected