feat(tui): support goal budgets

This commit is contained in:
Felipe Coury
2026-05-02 15:55:16 -03:00
parent 35aaa5d9fc
commit 06bebefbfc
37 changed files with 2138 additions and 53 deletions
@@ -3,6 +3,16 @@
"definitions": {
"ThreadGoal": {
"properties": {
"budget": {
"anyOf": [
{
"$ref": "#/definitions/ThreadGoalBudget"
},
{
"type": "null"
}
]
},
"createdAt": {
"format": "int64",
"type": "integer"
@@ -47,6 +57,80 @@
],
"type": "object"
},
"ThreadGoalBudget": {
"oneOf": [
{
"properties": {
"token_budget": {
"format": "int64",
"type": "integer"
},
"type": {
"enum": [
"tokens"
],
"title": "TokensThreadGoalBudgetType",
"type": "string"
}
},
"required": [
"token_budget",
"type"
],
"title": "TokensThreadGoalBudget",
"type": "object"
},
{
"properties": {
"baseline_resets_at": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"baseline_used_percent": {
"format": "double",
"type": "number"
},
"latest_resets_at": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"latest_used_percent": {
"format": "double",
"type": "number"
},
"limit_id": {
"type": "string"
},
"percent": {
"format": "double",
"type": "number"
},
"type": {
"enum": [
"fiveHourLimitPercent"
],
"title": "FiveHourLimitPercentThreadGoalBudgetType",
"type": "string"
}
},
"required": [
"baseline_used_percent",
"latest_used_percent",
"limit_id",
"percent",
"type"
],
"title": "FiveHourLimitPercentThreadGoalBudget",
"type": "object"
}
]
},
"ThreadGoalStatus": {
"enum": [
"active",