-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelper-copilot.ps1
More file actions
28 lines (23 loc) · 1.34 KB
/
Copy pathhelper-copilot.ps1
File metadata and controls
28 lines (23 loc) · 1.34 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
# Copilot session helpers.
#
# These thin wrappers expose the copilot-session plugin's PowerShell script for
# interactive use from the shell. The SAME script backs the copilot-session
# skill, so there is a single implementation/source of truth: the plugin script
# under plugins\copilot-session. See that plugin's SKILL.md for full docs.
$script:CopilotSessionScript = (Join-Path $PSScriptRoot "plugins\copilot-session\skills\copilot-session\scripts\Copilot-Session.ps1");
# Find, create, fork, or sync Copilot CLI sessions. All arguments are forwarded
# verbatim to the plugin script, e.g.:
# Copilot-Session -Action Find -Path .
# Copilot-Session -Action Find -Repository owner/repo
# Copilot-Session -Action Fork -Session a8579b9 -NewName experiment -Launch
# Copilot-Session -Action Sync -Session <cloud-id-or-task-id> -Launch
function Copilot-Session {
& $script:CopilotSessionScript @args;
}
# Convenience wrappers that preset -Action.
function Find-CopilotSession { Copilot-Session -Action Find @args; }
function New-CopilotSession { Copilot-Session -Action New @args; }
function Fork-CopilotSession { Copilot-Session -Action Fork @args; }
function Sync-CopilotSession { Copilot-Session -Action Sync @args; }
# Short alias for the most common operation (searching).
Set-Alias -Name cops -Value Find-CopilotSession;