ai
7 endpoints
get /ai/chat
Get the AskAI history
Requires authentication
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
post /ai/chat
Send a message to AskAI
Requires authentication
Appends the message to the caller's persisted thread, runs the LLM with recent context, and returns the reply.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| scope | query | string | no | Chat scope (e.g. all, project:42) |
Request body: handler.ChatRequest
| Name | Type | Required | Description |
|---|---|---|---|
| message | string | no | |
| pageContext | string | no |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
delete /ai/chat
Clear the AskAI history
Requires authentication
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
post /ai/draft-comment
Draft a reply comment
Requires authentication
Drafts a reply to a task's discussion thread from a short transcript. One-shot — not persisted to AskAI history.
Request body: handler.DraftCommentRequest
| Name | Type | Required | Description |
|---|---|---|---|
| context | string | no | |
| taskType | string | no |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
post /ai/draft-issue
Draft a new issue from a raw title
Requires authentication
Best-effort: returns a refined title, markdown description, priority hint, and label suggestions. Never 500s.
Request body: handler.DraftIssueRequest
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | integer | no | |
| title | string | no | |
| type | string | no | bug | feature | change |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
post /ai/generate-description
Generate a task description
Requires authentication
Request body: handler.GenerateDescriptionRequest
| Name | Type | Required | Description |
|---|---|---|---|
| description | string | no | current description |
| taskType | string | no | "bug", "feature" or "change" |
| title | string | no | current title |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
post /ai/generate-title
Generate a task title
Requires authentication
Request body: handler.GenerateTitleRequest
| Name | Type | Required | Description |
|---|---|---|---|
| description | string | no | current description |
| taskType | string | no | "bug", "feature" or "change" |
| title | string | no | current title |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope