Skip to content

Commit 031241c

Browse files
committed
Add learn more buttons and documentation links to agent search options
- to agent selector, on antigravity add info action opening https://antigravity.google/docs/cli/headless/ - translate tooltip: 'Learn more' - to claude add link https://code.claude.com/docs/en/headless, to codex add https://learn.chatgpt.com/docs/non-interactive-mode
1 parent 9699e1c commit 031241c

2 files changed

Lines changed: 49 additions & 4 deletions

File tree

‎apps/editor/src/features/search-files/search-modes/perform-agent-search-mode.ts‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,21 @@ export const perform_agent_search_mode = async (params: {
9595
return undefined
9696
}
9797

98-
const agent_picks = available_agents.map((a) => ({
99-
label: a.label,
100-
cmd: a.cmd
101-
}))
98+
const agent_picks = available_agents.map((a) => {
99+
const pick: vscode.QuickPickItem & { cmd: string } = {
100+
label: a.label,
101+
cmd: a.cmd
102+
}
103+
104+
pick.buttons = [
105+
{
106+
iconPath: new vscode.ThemeIcon('globe'),
107+
tooltip: t('feature.search-files.agent.learn-more')
108+
}
109+
]
110+
111+
return pick
112+
})
102113

103114
const close_button = {
104115
iconPath: new vscode.ThemeIcon('close'),
@@ -132,6 +143,22 @@ export const perform_agent_search_mode = async (params: {
132143
}
133144
})
134145

146+
agent_quick_pick.onDidTriggerItemButton((e) => {
147+
if (e.item.cmd == 'agy') {
148+
vscode.env.openExternal(
149+
vscode.Uri.parse('https://antigravity.google/docs/cli/headless/')
150+
)
151+
} else if (e.item.cmd == 'claude') {
152+
vscode.env.openExternal(
153+
vscode.Uri.parse('https://code.claude.com/docs/en/headless')
154+
)
155+
} else if (e.item.cmd == 'codex') {
156+
vscode.env.openExternal(
157+
vscode.Uri.parse('https://learn.chatgpt.com/docs/non-interactive-mode')
158+
)
159+
}
160+
})
161+
135162
agent_quick_pick.onDidAccept(() => {
136163
const selected = agent_quick_pick.selectedItems[0]
137164
if (selected) {

‎apps/editor/src/i18n/translations/features/search-files.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,5 +1084,23 @@ export const translations = {
10841084
cs: 'Nebyli nalezeni žádní agenti v cestě (např. agy, codex, claude).',
10851085
hu: 'Nem találhatók ügynökök a PATH-ban (pl. agy, codex, claude).',
10861086
bg: 'Не са намерени агенти в PATH (напр. agy, codex, claude).'
1087+
},
1088+
'feature.search-files.agent.learn-more': {
1089+
en: 'Learn more',
1090+
pl: 'Dowiedz się więcej',
1091+
'zh-cn': '了解更多',
1092+
ja: '詳細を見る',
1093+
'zh-tw': '了解更多',
1094+
de: 'Mehr erfahren',
1095+
es: 'Más información',
1096+
fr: 'En savoir plus',
1097+
'pt-br': 'Saiba mais',
1098+
ru: 'Подробнее',
1099+
ko: '자세히 알아보기',
1100+
it: 'Scopri di più',
1101+
tr: 'Daha fazla bilgi edinin',
1102+
cs: 'Další informace',
1103+
hu: 'Tudjon meg többet',
1104+
bg: 'Научете повече'
10871105
}
10881106
} as const

0 commit comments

Comments
 (0)