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: addprompt andapp_id fields tocoder_ai_task#445

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 3 commits intomainfromdanielle/tasks/ai-fields
Oct 1, 2025

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedSep 26, 2025
edited
Loading

Closescoder/internal#977

Adds one required fieldapp_id, one read-only computed fieldprompt,
as well as deprecates thesidebar_app field.

Also updates theid field to inherit the value fromCODER_TASK_ID
env variable

@DanielleMaywoodDanielleMaywoodforce-pushed thedanielle/tasks/ai-fields branch 4 times, most recently from0a8c610 tobf7817eCompareSeptember 29, 2025 10:57
@DanielleMaywoodDanielleMaywood changed the titlefeat: addtask_id,prompt andapp_id fields tocoder_ai_taskfeat: addprompt andapp_id fields tocoder_ai_taskSep 29, 2025
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for task identification and prompt handling in thecoder_ai_task resource by introducing new fields and deprecating the existingsidebar_app configuration pattern.

  • Adds requiredapp_id field and computedtask_id/prompt fields to thecoder_ai_task resource
  • Deprecates thesidebar_app field in favor of the simplerapp_id approach
  • Updates tests to cover the new field validation and backward compatibility scenarios

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
provider/provider.goUpdates resource function name fromaiTask() toaiTaskResource()
provider/ai_task.goImplements new fields with environment variable integration and backward compatibility logic
provider/ai_task_test.goAdds comprehensive test coverage for new fields, validation, and deprecation scenarios
docs/resources/ai_task.mdUpdates documentation to reflect the new optional/computed fields and deprecation

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Closescoder/internal#977Adds one required field `app_id`, one read-only computed field `prompt`,as well as deprecates the `sidebar_app` field.Also updates the `id` field to inherit the value from `CODER_TASK_ID`env variable
Comment on lines 33 to 35
}else {
resourceData.SetId(uuid.NewString())
}
Copy link
Member

Choose a reason for hiding this comment

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

Would it make more sense to exit with an error here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I don't mind either.

What would happen if the provider version this lands in is used with an older version of coder? (I guess also do we care?)

Copy link
Member

Choose a reason for hiding this comment

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

The integration tests will tell us :)
I'd expect that it won't have any effect unless the template defines acoder_ai_task. In that case, folks can lock their provider version.

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.

LGTM!

}

ifprompt:=os.Getenv("CODER_TASK_PROMPT");prompt!="" {
resourceData.Set("prompt",prompt)
Copy link
Member

Choose a reason for hiding this comment

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

Question, prompt vs input? I don't personally mind either way as both work. "You give your task an initial prompt and then send new input".

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The RFC laid out prompt so I'm tempted to keep it here, I also don't mind either way.

@DanielleMaywoodDanielleMaywood merged commitc2c443b intomainOct 1, 2025
6 checks passed
@DanielleMaywoodDanielleMaywood deleted the danielle/tasks/ai-fields branchOctober 1, 2025 11:25
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 1, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

Copilot code reviewCopilotCopilot left review comments

@mafredrimafredrimafredri approved these changes

@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.

coder terraform provider: modifycoder_ai_task to add app_id and prompt fields
3 participants
@DanielleMaywood@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp