Commit graph

5446 commits

Author SHA1 Message Date
Kynan Ware
666f5574e4 Remove unused stdin field from create command tests
The 'stdin' field and related code were removed from TestNewCmdCreate as they were no longer used. This simplifies the test structure and eliminates unnecessary code.
2025-09-11 09:20:48 -06:00
Kynan Ware
872cf495c2 Refactor create command tests and add base branch case
Removed redundant test cases for file input and stdin in TestNewCmdCreate, and added a new test to verify that the base branch argument sets the BaseBranch field correctly.
2025-09-11 09:19:52 -06:00
Babak K. Shandiz
10e4abc515
refactor(pr/shared): rename rest to tail
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-11 09:04:17 +01:00
Babak K. Shandiz
1c37ab9453
refactor(agent-task/shared): enhance symbol names
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-11 09:03:36 +01:00
Kynan Ware
deee0c61ed Update command examples for agent-task create
Improves the help text for the 'gh agent-task create' command by clarifying the editor usage example and adding an example for using a file as a template.
2025-09-10 18:39:35 -06:00
Kynan Ware
c0a5b9aced Refactor agent-task create to improve file input handling
Moves file reading for the problem statement from argument parsing to execution, storing the file path in CreateOptions. Updates error handling and user prompts to better distinguish between interactive and non-interactive modes. Refactors and expands tests to match the new logic and improve coverage for file and prompt scenarios.
2025-09-10 18:19:12 -06:00
Babak K. Shandiz
2311a04688
fix(pr/shared): ensure ParseURL regexp is backward-compatible
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 19:07:52 +01:00
Babak K. Shandiz
b079ea82e5
refactor(agent-task/shared): extract uuid pattern
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 19:07:03 +01:00
Babak K. Shandiz
6b872923ea
refactor(agent-task view): rename resourceID to prID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 18:57:58 +01:00
Babak K. Shandiz
3798d98969
feat(agent-task view): support PR /agent-sessions/* URL as argument
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 18:57:58 +01:00
Babak K. Shandiz
7e21837f3d
fix(agent-task/shared): add ParsePullRequestAgentSessionURL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 18:57:57 +01:00
Babak K. Shandiz
78b09e55e5
fix(pr/shared): add rest return value to ParseURL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 18:57:57 +01:00
Kynan Ware
20c89043bb
Merge pull request #11704 from cli/babakks/add-web-flag-to-view-cmd
`gh agent-task view`: add `--web` flag
2025-09-10 11:54:59 -06:00
Babak K. Shandiz
6a5481368f
docs(agent-task view): improve --help docs
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 13:53:45 +01:00
Babak K. Shandiz
4cebd35791
refactor(agent-task create): assign Config at instantiation
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 12:48:31 +01:00
Babak K. Shandiz
b463395d48
fix(agent-task create): only prompt for problem statement if not provided
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 12:45:34 +01:00
Babak K. Shandiz
88e2d0d7d9
fix(agent-task view): stop progress indicator before opening browser
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:41:49 +01:00
Babak K. Shandiz
b3b8697cf3
test(agent-task view): enhance naming and stubs
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:29 +01:00
Babak K. Shandiz
ecbad7ecb9
test(agent-task view): add --web mode tests
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:29 +01:00
Babak K. Shandiz
57d9f1ff0e
feat(agent-task view): add --web mode
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:29 +01:00
Babak K. Shandiz
ab7e4039da
refactor: move Copilot Agents home URL to capi
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:28 +01:00
Babak K. Shandiz
6b29c2905c
fix(agent-task/capi): also return PR URL from GetPullRequestDatabaseID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:28 +01:00
Kynan Ware
6945fc0183 Still prompt for task desc with -F 2025-09-09 17:08:04 -06:00
Kynan Ware
563809362b Add interactive prompt for task description in agent-task create
Enhances the agent-task create command to prompt users for a task description interactively if none is provided and the terminal supports prompting. Updates tests to cover interactive and non-interactive scenarios, including error handling for empty input and prompt failures.
2025-09-09 16:19:52 -06:00
Kynan Ware
1f107cec4f Fix default value in session selection prompt
Updated the call to Prompter.Select to use an empty string as the default value instead of options[0], ensuring no session is preselected by default.
2025-09-09 16:15:10 -06:00
Kynan Ware
bbf7586578 Show session name instead of ID in agent-task list
Updated the agent-task list command to display the session name instead of the session ID in the table output and header. Adjusted tests to reflect this change by using the Name field for display and updating expected outputs accordingly.
2025-09-09 11:06:53 -06:00
Babak K. Shandiz
ec8f412cca
docs(agent-task view): explain test case rationale
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 12:24:09 +01:00
Babak K. Shandiz
f8ff42a3f1
docs(agent-task view): explain when condition is met
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 12:22:21 +01:00
Babak K. Shandiz
8b1f722911
docs(agent-task/capi): remove redundant comment
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 12:09:34 +01:00
Babak K. Shandiz
0a9a4a4250
test(agent-task/capi): fix test case args
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 11:37:49 +01:00
Babak K. Shandiz
d52502b638
fix(agent-task/capi): skip unpopulated resource ID when hydrating
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 11:37:28 +01:00
Babak K. Shandiz
922843301d
docs(agent-task/shared): add godoc to SessionStateString
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 10:57:51 +01:00
Babak K. Shandiz
6b19a85471
Merge pull request #11638 from cli/babakks/use-advanced-issue-search
Use advanced issue search
2025-09-08 20:32:22 +01:00
Babak K. Shandiz
37896d613a
fix(featuredetection): remove redundant AdvancedIssueSearchWebInIssuesTab field
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:46:28 +01:00
Babak K. Shandiz
2c08f20c33
docs(search prs): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:37 +01:00
Babak K. Shandiz
cc60d9c3fa
docs(search issues): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:17 +01:00
Babak K. Shandiz
02dc03c8e2
docs(pr list): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:36:46 +01:00
Babak K. Shandiz
02ee337818
docs(issue list): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:36:24 +01:00
Babak K. Shandiz
ef69901f05
refactor(search): rename Query.String to StandardSearchString
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 16:04:47 +01:00
Babak K. Shandiz
6e78b8d68f
test(agent-task view): update tests
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:51:38 +01:00
Babak K. Shandiz
d06d0262e6
fix(agent-task view): use lower limit for fetching sessions
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:51:14 +01:00
Babak K. Shandiz
c1beeb5d53
fix(agent-task view): use CapiClient.GetPullRequestDatabaseID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:50:47 +01:00
Babak K. Shandiz
f8f7b0e09b
fix(agent-task/capi): add GetPullRequestDatabaseID to CapiClient interface
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:50:09 +01:00
Babak K. Shandiz
abd2d8a06d
test(agent-task/capi): add tests for GetPullRequestDatabaseID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:49:27 +01:00
Babak K. Shandiz
f57114accc
feat(agent-task/capi): add GetPullRequestDatabaseID method
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:48:56 +01:00
Babak K. Shandiz
d80b25fbf2
test(agent-task/capi): add tests for GetSessionByResourceID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 11:27:40 +01:00
Babak K. Shandiz
8482e3d2a4
feat(agent-task view): support PR arg
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 17:03:59 +01:00
Babak K. Shandiz
e68e28ddf3
fix(agent-task/shared): add SessionSymbol func
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 17:02:45 +01:00
Babak K. Shandiz
09e1f2532d
test(agent-task/shared): add test for IsSessionID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 17:02:15 +01:00
Babak K. Shandiz
5f6189be09
fix(agent-task/shared): add IsSessionID
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 16:58:25 +01:00