Skip to content

Commit 0e10473

Browse files
committed
pr 3
1 parent d01e533 commit 0e10473

70 files changed

Lines changed: 17463 additions & 16344 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cli/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
11551155
defer shutdownConns()
11561156

11571157
// Ensures that old database entries are cleaned up over time!
1158-
purger := dbpurge.New(ctx, logger.Named("dbpurge"), options.Database, options.DeploymentValues, options.PrometheusRegistry, &coderAPI.Auditor, dbpurge.WithNotificationsEnqueuer(options.NotificationsEnqueuer))
1158+
purger := dbpurge.New(ctx, logger.Named("dbpurge"), options.Database, options.DeploymentValues, options.PrometheusRegistry, &coderAPI.Auditor)
11591159
defer purger.Close()
11601160

11611161
// Updates workspace usage

coderd/coderd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,8 @@ func New(options *Options) *API {
835835
UsageTracker: options.WorkspaceUsageTracker,
836836
PrometheusRegistry: options.PrometheusRegistry,
837837
OIDCTokenSource: oidcMCPSrc,
838+
NotificationsEnqueuer: options.NotificationsEnqueuer,
839+
Auditor: &api.Auditor,
838840
}).Start()
839841
gitSyncLogger := options.Logger.Named("gitsync")
840842
refresher := gitsync.NewRefresher(

coderd/database/dbpurge/dbpurge.go

Lines changed: 30 additions & 315 deletions
Large diffs are not rendered by default.

coderd/database/dbpurge/dbpurge_test.go

Lines changed: 2 additions & 1062 deletions
Large diffs are not rendered by default.

coderd/exp_chats.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,12 @@ func (api *API) postChats(rw http.ResponseWriter, r *http.Request) {
12771277
}
12781278
aReq.New = chat
12791279

1280+
// Kick off best-effort automatic title generation now that the
1281+
// chat and its initial user message are persisted. It runs
1282+
// detached so it never blocks the create response, and only acts
1283+
// on the first user turn.
1284+
api.chatDaemon.GenerateChatTitleAsync(ctx, chat)
1285+
12801286
chatFiles := api.fetchChatFileMetadata(ctx, chat.ID)
12811287
response := db2sdk.Chat(chat, nil, chatFiles)
12821288
if len(unlinked) > 0 {

0 commit comments

Comments
 (0)