Skip to content

Commit 63eee6f

Browse files
committed
Marshaled sessions
1 parent 4c202ca commit 63eee6f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/vs/workbench/api/common/extHostChatSessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class ExtHostChatSessions extends Disposable implements ExtHostChatSessio
7575
commands.registerArgumentProcessor({
7676
processArgument: (arg) => {
7777
if (arg && arg.$mid === MarshalledId.ChatSessionContext) {
78-
const id = arg.id;
78+
const id = arg.session.id;
7979
const sessionContent = this._sessionMap.get(id);
8080
if (sessionContent) {
8181
return sessionContent;

src/vs/workbench/contrib/chat/browser/actions/chatActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ export function registerChatActions() {
756756
const contextItem = context.item as ICodingAgentPickerItem;
757757
commandService.executeCommand(buttonItem.id, {
758758
uri: contextItem.uri,
759-
session: contextItem.session,
759+
session: contextItem.session?.session,
760760
$mid: MarshalledId.ChatSessionContext
761761
});
762762

src/vs/workbench/contrib/chat/browser/chatSessions.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { IMenuService, MenuId, MenuRegistry } from '../../../../platform/actions
2424
import { getActionBarActions } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';
2525
import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';
2626
import { ViewPaneContainer } from '../../../browser/parts/views/viewPaneContainer.js';
27+
import { MarshalledId } from '../../../../base/common/marshallingIds.js';
2728
import { ViewPane, IViewPaneOptions } from '../../../browser/parts/views/viewPane.js';
2829
import { Extensions, IViewContainersRegistry, IViewDescriptorService, ViewContainerLocation, IViewsRegistry, IViewDescriptor } from '../../../common/views.js';
2930
import { IExtensionService } from '../../../services/extensions/common/extensions.js';
@@ -698,7 +699,13 @@ class SessionsRenderer extends Disposable implements ITreeRenderer<IChatSessionI
698699
const setupActionBar = () => {
699700
templateData.actionBar.clear();
700701

701-
const actions = menu.getActions({ arg: session, shouldForwardArgs: true });
702+
// Create marshalled context for command execution
703+
const marshalledSession = {
704+
session: session,
705+
$mid: MarshalledId.ChatSessionContext
706+
};
707+
708+
const actions = menu.getActions({ arg: marshalledSession, shouldForwardArgs: true });
702709

703710
const { primary } = getActionBarActions(
704711
actions,

0 commit comments

Comments
 (0)