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

chore: remove deprecated AITaskPromptParameterName constant#21023

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

Open
mafredri wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromfix-deprecated-parameter-removal

Conversation

@mafredri
Copy link
Member

@mafredrimafredri commentedDec 1, 2025
edited
Loading

Summary

This PR removes the deprecatedAITaskPromptParameterName constant and all backward compatibility code that was added in v2.28 for theAI Prompt parameter.

Background

In v2.28, task prompts were migrated from being stored as workspace build parameters (named "AI Prompt") to being stored directly in thetasks.prompt database column. TheAITaskPromptParameterName constant was kept for backward compatibility with older templates that might still define an "AI Prompt" parameter.

Changes

Backend

  • RemoveAITaskPromptParameterName constant fromcodersdk/aitasks.go
  • Remove backward compatibility code incoderd/aitasks.go that automatically populated the "AI Prompt" parameter for templates that defined it
  • Remove the import ofgithub.com/coder/terraform-provider-coder/v2/provider from codersdk
  • Removecoderd/util/slice import as it's no longer needed
  • Updatedbfake.WorkspaceBuildBuilder.WithTask() to no longer set the AI Prompt parameter

Tests

  • Remove theOK AIPromptBackCompat test case fromcoderd/aitasks_test.go
  • Updatetoolsdk_test.go to not require AI Prompt parameter in template version

Frontend

  • RemoveAITaskPromptParameterName constant fromsite/src/api/typesGenerated.ts
  • Remove the preset prompt read-only feature fromTaskPrompt.tsx component that relied on the AI Prompt parameter
  • UpdateMockAIPromptPresets test mock to not include the AI Prompt parameter
  • RenameReadOnlyPresetPrompt story toWithAIPresets

Result

Task prompts are now exclusively stored in thetasks.prompt database column. Templates no longer need to define an "AI Prompt" parameter to work with tasks.

Note: The Terraform provider (github.com/coder/terraform-provider-coder) may still require this parameter forcoder_ai_task resources. That's a separate change tracked in a corresponding provider issue.

Closescoder/internal#1150

This removes the deprecated AITaskPromptParameterName constant andall backward compatibility code that was added in v2.28.Changes:- Remove AITaskPromptParameterName constant from codersdk/aitasks.go- Remove backward compatibility code in coderd/aitasks.go that  automatically populated the 'AI Prompt' parameter for templates  that defined it- Remove the backward compatibility test (OK AIPromptBackCompat)- Update dbfake to no longer set the AI Prompt parameter- Update toolsdk tests to not require AI Prompt parameter- Remove AITaskPromptParameterName from frontend TypeScript types- Remove preset prompt read-only feature from TaskPrompt component  that relied on the AI Prompt parameter- Update test mocks (MockAIPromptPresets) to not include AI PromptTask prompts are now exclusively stored in the tasks.prompt databasecolumn, as introduced in the migration that added the tasks table.Related:coder/internal#1150
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tasks: remove deprecated fieldai_prompt

2 participants

@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp