MCPcopy Index your code
hub / github.com/coder/coder / ProposeChatTitle

Method ProposeChatTitle

codersdk/chats.go:3250–3261  ·  view source on GitHub ↗

ProposeChatTitle requests the server to generate a suggested chat title without persisting it.

(ctx context.Context, chatID uuid.UUID)

Source from the content-addressed store, hash-verified

3248
3249// ProposeChatTitle requests the server to generate a suggested chat title without persisting it.
3250func (c *ExperimentalClient) ProposeChatTitle(ctx context.Context, chatID uuid.UUID) (ProposeChatTitleResponse, error) {
3251 res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/experimental/chats/%s/title/propose", chatID), nil)
3252 if err != nil {
3253 return ProposeChatTitleResponse{}, err
3254 }
3255 defer res.Body.Close()
3256 if res.StatusCode != http.StatusOK {
3257 return ProposeChatTitleResponse{}, readBodyAsChatUsageLimitError(res)
3258 }
3259 var resp ProposeChatTitleResponse
3260 return resp, json.NewDecoder(res.Body).Decode(&resp)
3261}
3262
3263// GetChatDiffContents returns resolved diff contents for a chat.
3264func (c *ExperimentalClient) GetChatDiffContents(ctx context.Context, chatID uuid.UUID) (ChatDiffContents, error) {

Callers 1

TestProposeChatTitleFunction · 0.95

Calls 3

CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestProposeChatTitleFunction · 0.76