mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
merge to main (#299794)
* sessions - fix chat input shrinking at narrow widths (#299498) style - set width to 100% for `interactive-input-part` * modal - force focus into first modal editor always * fix: update precondition for FixDiagnosticsAction and hide input widget on command execution (#299499) fixes https://github.com/microsoft/vscode/issues/299251 * refactor: remove workspace context service dependency from FolderPicker * Add logging for agent feedback actions * modal - some fixes to actions and layout * modal - surface some editor actions in a new toolbar (#299582) * modal - surface some editor actions in a new toolbar * ccr * keybindings - remove "Edit as JSON" as its now available from the title menu * settings - remove "Edit as JSON" as its now available from the title menu * update hover fixes * terminal fixes * terminal improvements * Sessions: fix auth scopes of gh FSP * sessions customizations: make it easier to scan mcp/plugin marketplac… (#299636) sessions customizations: make it easier to scan mcp/plugin marketplace list * sessions: add built-in prompt files with override support (#299629) * sessions: add built-in prompt files with override support Ship bundled .prompt.md files with the Sessions app that appear as slash commands out of the box. Built-in prompts use a BUILTIN_STORAGE constant (cast as PromptsStorage) defined in the aiCustomization layer, avoiding changes to the core PromptsStorage enum and prompt service types. - AgenticPromptsService discovers prompts from vs/sessions/prompts/ at runtime via FileAccess and injects them into the listing pipeline - Override logic: user/workspace prompts with matching names take precedence over built-in ones - Built-in prompts open as read-only in the management editor - Sessions tree view, workspace service, and counts handle BUILTIN_STORAGE - Add /create-pr as the first built-in prompt - Bundle prompt files via gulpfile resource includes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * sessions: use AICustomizationPromptsStorage type for builtin storage Adopt the new AICustomizationPromptsStorage union type in the sessions tree view method signature. Use string-keyed Records and targeted casts at the PromptsStorage boundary to stay type-safe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: remove PromptsStorage casts, widen IStorageSourceFilter Use AICustomizationPromptsStorage in sessions-local interfaces (IAICustomizationGroupItem, IAICustomizationFileItem) and widen IStorageSourceFilter.sources to readonly string[] so BUILTIN_STORAGE flows through without casts. The only remaining cast is at the IPromptPath creation boundary in AgenticPromptsService. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: move BUILTIN_STORAGE to sessions common layer Move AICustomizationPromptsStorage type and BUILTIN_STORAGE constant from the workbench browser UI module to sessions/contrib/chat/common so that AgenticPromptsService (a service) does not depend on UI code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * sessions: fix ESLint dangerous type assertion in builtin prompts (#299663) Replace the `as IPromptPath` cast in discoverBuiltinPrompts with a createBuiltinPromptPath factory function that contains the type narrowing in one place, satisfying the code-no-dangerous-type-assertions ESLint rule. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Enhance Agent Sessions Control and Renderer with observable active session resource * fix terminal * Enable model management in NewChatWidget * review feedback * different competion settings for copilot markdown and plaintext --------- Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com> Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com> Co-authored-by: BeniBenj <besimmonds@microsoft.com> Co-authored-by: Osvaldo Ortega <osortega@microsoft.com> Co-authored-by: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3623d50299
commit
2b32258b0e
@@ -90,28 +90,6 @@ function resolveSessionRepo(gitAPI: GitAPI, sessionMetadata: { worktreePath?: st
|
||||
return { repository, remoteInfo, gitRemote: { name: gitRemote.name, fetchUrl: gitRemote.fetchUrl! }, head: head as ResolvedSessionRepo['head'] };
|
||||
}
|
||||
|
||||
async function checkOpenPullRequest(gitAPI: GitAPI, _sessionResource: vscode.Uri | undefined, sessionMetadata: { worktreePath?: string } | undefined): Promise<void> {
|
||||
const resolved = resolveSessionRepo(gitAPI, sessionMetadata, false);
|
||||
if (!resolved) {
|
||||
vscode.commands.executeCommand('setContext', 'github.hasOpenPullRequest', false);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const octokit = await getOctokit();
|
||||
const { data: openPRs } = await octokit.pulls.list({
|
||||
owner: resolved.remoteInfo.owner,
|
||||
repo: resolved.remoteInfo.repo,
|
||||
head: `${resolved.remoteInfo.owner}:${resolved.head.name}`,
|
||||
state: 'all',
|
||||
});
|
||||
|
||||
vscode.commands.executeCommand('setContext', 'github.hasOpenPullRequest', openPRs.length > 0);
|
||||
} catch {
|
||||
vscode.commands.executeCommand('setContext', 'github.hasOpenPullRequest', false);
|
||||
}
|
||||
}
|
||||
|
||||
async function createPullRequest(gitAPI: GitAPI, sessionResource: vscode.Uri | undefined, sessionMetadata: { worktreePath?: string } | undefined): Promise<void> {
|
||||
if (!sessionResource) {
|
||||
return;
|
||||
@@ -263,9 +241,5 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
|
||||
return openPullRequest(gitAPI, sessionResource, sessionMetadata);
|
||||
}));
|
||||
|
||||
disposables.add(vscode.commands.registerCommand('github.checkOpenPullRequest', async (sessionResource: vscode.Uri | undefined, sessionMetadata: { worktreePath?: string } | undefined) => {
|
||||
return checkOpenPullRequest(gitAPI, sessionResource, sessionMetadata);
|
||||
}));
|
||||
|
||||
return disposables;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user