Repository navigation
Expand file tree
/
Copy pathClaudeCodeExtensionPackage.vsct
More file actions
130 lines (118 loc) · 6.96 KB
/
Copy pathClaudeCodeExtensionPackage.vsct
File metadata and controls
130 lines (118 loc) · 6.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Include href="KnownImageIds.vsct"/>
<Commands package="guidClaudeCodeExtensionPackage">
<!-- "Claude Code" toolbar (View > Toolbars): one click to the chat or the panel instead of
View > Other Windows. DefaultDocked shows it the first time the extension loads. -->
<Menus>
<Menu guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolbar" priority="0x0000" type="Toolbar">
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>Claude Code</ButtonText>
<CommandName>Claude Code</CommandName>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolbarGroup" priority="0x0000">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolbar"/>
</Group>
<!-- The same two commands straight in the View menu, next to the other tool windows. -->
<Group guid="guidClaudeCodeExtensionPackageCmdSet" id="ViewMenuGroup" priority="0x0600">
<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_VIEW"/>
</Group>
<!-- Standard code editor context menu (C#, VB, C++, F#, JSON, CSS, JS standalone, XML, etc.).
The modern HTML / Razor / WebForms editors in VS 17+/18 build their context menu via
the Editor Commanding framework and do NOT expose a VSCT-targetable group, so the
Send Selection command cannot appear there from a third-party extension. A prior attempt
to reach it via "IDM_VS_CTXT_HTMLCODE" broke the build (v10.65/10.66, see CommandPlacements
below for the other pitfall it likely also hit) — any future context menu group needs a
real, VS-registered GUID+ID pair, the way guidVSXamlWindowContextMenu below does for XAML. -->
<Group guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorContextMenuGroup" priority="0x0600">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
</Group>
<!-- The XAML editor (WPF/UWP/Xamarin.Forms) builds its own context menu under a private,
package-owned GUID instead of IDM_VS_CTXT_CODEWIN, so it needs its own group. Value taken
from the VS shell's registered XAML editor context menu (also used by third-party
extensions such as XAML Styler to add commands there). -->
<Group guid="guidVSXamlWindowContextMenu" id="XamlContextMenuGroup" priority="0x0600">
<Parent guid="guidVSXamlWindowContextMenu" id="IDVSXamlWindowContextMenu"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolWindowCommandId" priority="0x0100" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
<Icon guid="guidImages" id="bmpIcon" />
<CommandFlag>IconAndText</CommandFlag>
<Strings>
<ButtonText>Claude Code Extension</ButtonText>
</Strings>
</Button>
<!-- The always-available way back to the native-mode chat (issue #168). Same icon as the chat tab. -->
<Button guid="guidClaudeCodeExtensionPackageCmdSet" id="ShowNativeChatCommandId" priority="0x0101" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
<Icon guid="ImageCatalogGuid" id="Comment" />
<CommandFlag>IconIsMoniker</CommandFlag>
<CommandFlag>IconAndText</CommandFlag>
<Strings>
<ButtonText>Claude Code Chat</ButtonText>
</Strings>
</Button>
<Button guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorSendSelectionCommandId" priority="0x0100" type="Button">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorContextMenuGroup"/>
<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>TextChanges</CommandFlag>
<Strings>
<ButtonText>Send Selection to Claude Code</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
<Bitmap guid="guidImages" href="app.ico" usedList="bmpIcon"/>
</Bitmaps>
</Commands>
<!-- CommandPlacements is a sibling of Commands, not a subsection of it — nesting it inside
Commands is VSCT1102 (this is what actually broke the HTML editor attempt in v10.65/10.66,
not the guidSHLMainMenu symbol noted above; both mistakes are worth avoiding here). -->
<CommandPlacements>
<!-- Chat first: it is where the user talks to the agent; the panel holds toolbar and settings. -->
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="ShowNativeChatCommandId" priority="0x0100">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolbarGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolWindowCommandId" priority="0x0200">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolbarGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="ShowNativeChatCommandId" priority="0x0100">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="ViewMenuGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolWindowCommandId" priority="0x0200">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="ViewMenuGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorSendSelectionCommandId" priority="0x0100">
<Parent guid="guidVSXamlWindowContextMenu" id="XamlContextMenuGroup"/>
</CommandPlacement>
</CommandPlacements>
<Symbols>
<GuidSymbol name="guidClaudeCodeExtensionPackage" value="{3fa29425-3add-418f-82f6-0c9b7419b2ca}" />
<GuidSymbol name="guidClaudeCodeExtensionPackageCmdSet" value="{11111111-2222-3333-4444-555555555555}">
<IDSymbol name="ClaudeCodeToolWindowCommandId" value="0x0100" />
<IDSymbol name="ShowNativeChatCommandId" value="0x0101" />
<IDSymbol name="EditorContextMenuGroup" value="0x1020" />
<IDSymbol name="EditorSendSelectionCommandId" value="0x0201" />
<IDSymbol name="ClaudeCodeToolbar" value="0x1040" />
<IDSymbol name="ClaudeCodeToolbarGroup" value="0x1041" />
<IDSymbol name="ViewMenuGroup" value="0x1042" />
</GuidSymbol>
<!-- The XAML editor's own context menu, owned by Microsoft's XAML editor package (not part of
guidSHLMainMenu / vsshlids.h). -->
<GuidSymbol name="guidVSXamlWindowContextMenu" value="{4C87B692-1202-46AA-B64C-EF01FAEC53DA}">
<IDSymbol name="IDVSXamlWindowContextMenu" value="0x0103" />
<IDSymbol name="XamlContextMenuGroup" value="0x1030" />
</GuidSymbol>
<GuidSymbol name="guidImages" value="{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}">
<IDSymbol name="bmpIcon" value="1" />
</GuidSymbol>
</Symbols>
</CommandTable>