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

fix: deprecate codersdk.AITaskPromptParameterName and reduce usage#20501

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
mafredri merged 2 commits intomainfrommafredri/fix-coderd-replace-ai-promp
Oct 29, 2025

Conversation

@mafredri
Copy link
Member

@mafredrimafredri commentedOct 27, 2025
edited
Loading

Depends oncoder/sqlc#1
Fixescoder/internal#979
Updatescoder/internal#973

Notes:

  • The updated query here requires a patchsqlc, without the patch it incorrectly identifies ambigious columns.
    • queries/workspaces.sql:401:13: column reference "owner_id" is ambiguous (false positive)

@mafredrimafredriforce-pushed themafredri/fix-coderd-replace-ai-promp branch 4 times, most recently from483371e tob3dd0e7CompareOctober 28, 2025 14:47
@mafredrimafredri requested review fromDanielleMaywood andjohnstcn and removed request forDanielleMaywoodOctober 28, 2025 14:47
@mafredrimafredri marked this pull request as ready for reviewOctober 28, 2025 14:47
-- Consider all tasks, deleting a task does not turn the
-- workspace into a non-task workspace.
tasks.workspace_id=workspaces.id
)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Review: This here breaks with un-patched sqlc because it puts tasks.owner_id in global scope even though it's not selected.

Should we fork sqlc for now?

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with forking sqlc temporarily while an upstream bug is filed. I wonder if there's also the possibility of selectingid, workspace_id from tasks in a CTE and doing the join on that?

Copy link
Member

Choose a reason for hiding this comment

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

Can you drop the original bugged sql query? I'm curious to see what the failing/bugged query looked like.

Copy link
MemberAuthor

@mafredrimafredriOct 29, 2025
edited
Loading

Choose a reason for hiding this comment

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

@Emyrk This edit IS the bugged query, but check the added testdata incoder/sqlc#1 to see more.

Comment on lines +50 to +57
}).
WithAgent().
WithTask(database.TaskTable{
Prompt:prompt,
},nil).
Do()

returnbuild.Task
Copy link
Member

Choose a reason for hiding this comment

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

❤️

Comment on lines -1024 to -1027
r.Route("/aitasks",func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Get("/prompts",api.aiTasksPrompts)
})
Copy link
Member

Choose a reason for hiding this comment

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

I'm potentially concerned about this given our "one minor release" backward compat guarantee. Maybe mark this endpoint deprecated instead?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Was this ever used by anything other than the frontend? Considering the route is experimental and you can't run an old coderd with a newer frontend, I imagined this should be fine.

Copy link
Member

Choose a reason for hiding this comment

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

Not that I'm aware, no. I guess we can remove it with the provisio that this was always under/api/experimental.

mafredri reacted with thumbs up emoji
mafredri added a commit that referenced this pull requestOct 29, 2025
mafredri added a commit that referenced this pull requestOct 29, 2025
mafredri added a commit that referenced this pull requestOct 29, 2025
mafredri added a commit that referenced this pull requestOct 29, 2025
mafredri added a commit that referenced this pull requestOct 29, 2025
mafredri added a commit that referenced this pull requestOct 29, 2025
@mafredrimafredriforce-pushed themafredri/fix-coderd-replace-ai-promp branch fromb3dd0e7 toe592af3CompareOctober 29, 2025 16:48
@mafredrimafredrienabled auto-merge (squash)October 29, 2025 18:39
@mafredrimafredri merged commit859e94d intomainOct 29, 2025
33 checks passed
@mafredrimafredri deleted the mafredri/fix-coderd-replace-ai-promp branchOctober 29, 2025 18:59
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@EmyrkEmyrkEmyrk left review comments

@johnstcnjohnstcnjohnstcn approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

chore: tasks: replace exising usage of hard-coded "AI Prompt" parameter withtasks.prompt

5 participants

@mafredri@johnstcn@Emyrk@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp