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

Commitcc01d1f

Browse files
apply pr suggestions
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
1 parentb19836b commitcc01d1f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎coderd/aitasks.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (api *API) tasksCreate(rw http.ResponseWriter, r *http.Request) {
250250
TemplateVersionID:templateVersion.ID,
251251
TemplateParameters: []byte("{}"),
252252
Prompt:req.Input,
253-
CreatedAt:dbtime.Now(),
253+
CreatedAt:dbtime.Time(api.Clock.Now()),
254254
})
255255
iferr!=nil {
256256
returnhttperror.NewResponseError(http.StatusInternalServerError, codersdk.Response{

‎coderd/aitasks_test.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ func TestTasksCreate(t *testing.T) {
803803
ProvisionApply:echo.ApplyComplete,
804804
ProvisionPlan: []*proto.Response{
805805
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
806-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
806+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
807807
HasAiTasks:true,
808808
}}},
809809
},
@@ -876,7 +876,7 @@ func TestTasksCreate(t *testing.T) {
876876
ProvisionApply:echo.ApplyComplete,
877877
ProvisionPlan: []*proto.Response{
878878
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
879-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
879+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
880880
HasAiTasks:true,
881881
}}},
882882
},
@@ -992,7 +992,7 @@ func TestTasksCreate(t *testing.T) {
992992
ProvisionApply:echo.ApplyComplete,
993993
ProvisionPlan: []*proto.Response{
994994
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
995-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
995+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
996996
HasAiTasks:true,
997997
}}},
998998
},
@@ -1052,7 +1052,7 @@ func TestTasksCreate(t *testing.T) {
10521052
ProvisionApply:echo.ApplyComplete,
10531053
ProvisionPlan: []*proto.Response{
10541054
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
1055-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
1055+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
10561056
HasAiTasks:true,
10571057
}}},
10581058
},
@@ -1089,7 +1089,7 @@ func TestTasksCreate(t *testing.T) {
10891089
ProvisionApply:echo.ApplyComplete,
10901090
ProvisionPlan: []*proto.Response{
10911091
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
1092-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
1092+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
10931093
HasAiTasks:true,
10941094
}}},
10951095
},
@@ -1142,7 +1142,7 @@ func TestTasksCreate(t *testing.T) {
11421142
ProvisionApply:echo.ApplyComplete,
11431143
ProvisionPlan: []*proto.Response{
11441144
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
1145-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
1145+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
11461146
HasAiTasks:true,
11471147
}}},
11481148
},
@@ -1155,7 +1155,7 @@ func TestTasksCreate(t *testing.T) {
11551155
ProvisionApply:echo.ApplyComplete,
11561156
ProvisionPlan: []*proto.Response{
11571157
{Type:&proto.Response_Plan{Plan:&proto.PlanComplete{
1158-
Parameters: []*proto.RichParameter{{Name:"AI Prompt",Type:"string"}},
1158+
Parameters: []*proto.RichParameter{{Name:codersdk.AITaskPromptParameterName,Type:"string"}},
11591159
HasAiTasks:true,
11601160
}}},
11611161
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp