Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add exp task create command#19492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DanielleMaywood merged 6 commits intomainfromdanielle/tasks/cli-create
Aug 26, 2025

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedAug 22, 2025
edited
Loading

Partially implementscoder/internal#893

This isn't the full implementation ofcoder exp tasks create as defined in the issue, but it is the minimum required to create a task.

@DanielleMaywoodDanielleMaywood changed the titlefeat(cli): add task create commandfeat(cli): add exp task create commandAug 26, 2025
templateVersionPresetID=uuid.New()
)

templateAndVersionFoundHandler:=func(t*testing.T,ctx context.Context,templateName,templateVersionName,presetName,promptstring) http.HandlerFunc {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Decided to create a small helper here instead of writing the same handler over-and-over again. This is following in the footsteps of#19533 by using a http handler to mockcoderd behavior instead of usingcoderdtest.

johnstcn reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We might want to add a single "integration"-style test at the end in a separate PR so we know we've all our bases covered.

DanielleMaywood reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sounds good to me

@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewAugust 26, 2025 12:30
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Some suggestions/nits inline, but approach seems fine. We may want to consider moving some of the logic to the API endpoint if we want to make API usage more convenient, but this works for now.

workspace,err:=expClient.CreateTask(ctx,codersdk.Me, codersdk.CreateTaskRequest{
TemplateVersionID:templateVersionID,
TemplateVersionPresetID:templateVersionPresetID,
Prompt:taskInput,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggestion: Not sure if we're too far gone to do this, but potential for rename: Prompt -> Input depending on how we want to standardize this.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As it is all experimental we technically still have time

mafredri reacted with thumbs up emoji
@DanielleMaywoodDanielleMaywood merged commit63c1325 intomainAug 26, 2025
26 checks passed
@DanielleMaywoodDanielleMaywood deleted the danielle/tasks/cli-create branchAugust 26, 2025 14:24
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 26, 2025
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Post-merge approve and one more suggestion.

inv.Stdout,
"The task %s has been created at %s!\n",
cliui.Keyword(workspace.Name),
cliui.Timestamp(time.Now()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

workspace.CreatedAt?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The way I've implemented it is how we currently do it for workspace creation but I'm happy to create a quick follow up PR to address this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Up to you tbh, I'm good with either just thought it made sense so threw it out there. 👍🏻

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri left review comments

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@DanielleMaywood@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp