Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,18 @@ export abstract class BaseAgentHostSessionsProvider extends Disposable implement

// Open chat widget — getOrCreateChatSession will wait for the session
// handler to become available via canResolveChatSession internally.
// In background mode the caller keeps its own UI in front (e.g. the
// aquarium-as-sessions new-chat view), so skip the chat-widget reveal:
// `viewsService.openView(ChatViewId)` would return null while the
// new-chat view's when-clause is true and the send would otherwise
// fail outright. The session model is still loaded below via
// `acquireOrLoadSession`, which is all `sendRequest` actually needs.
await this._chatSessionsService.getOrCreateChatSession(sessionResource, CancellationToken.None);
const chatWidget = await this._chatWidgetService.openSession(sessionResource, ChatViewPaneTarget);
if (!chatWidget) {
throw new Error(`[${this.id}] Failed to open chat widget`);
if (!options.background) {
const chatWidget = await this._chatWidgetService.openSession(sessionResource, ChatViewPaneTarget);
if (!chatWidget) {
throw new Error(`[${this.id}] Failed to open chat widget`);
}
}

// Load session model and apply selected model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { InstantiationType, registerSingleton } from '../../../../platform/insta
import product from '../../../../platform/product/common/product.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { AquariumService, IAquariumService, SESSIONS_DEVELOPER_JOY_ENABLED_SETTING } from './aquariumOverlay.js';
import { AquariumSubmitIntentService, IAquariumSubmitIntentService } from './aquariumSubmitIntentService.js';

Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
id: 'sessions',
Expand All @@ -20,7 +21,13 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis
description: localize('sessions.developerJoy.enabled', "Adds an easter egg to the Agents application."),
tags: ['experimental'],
},
// NOTE: `SESSIONS_DEVELOPER_JOY_AQUARIUM_AS_SESSIONS_SETTING`
// (`sessions.developerJoy.aquariumAsSessions`) is intentionally NOT
// registered here. It is a hidden developer-opt-in gate that must not
// appear in Settings UI, IntelliSense, or default settings exports.
// See the constant's JSDoc in `aquariumOverlay.ts` for details.
},
});

registerSingleton(IAquariumService, AquariumService, InstantiationType.Delayed);
registerSingleton(IAquariumSubmitIntentService, AquariumSubmitIntentService, InstantiationType.Delayed);
Loading