forked from retoor/devplacepy
feat: add issue_usage tracking and metrics for AI ticket enhancement and planning
Add `issue_usage` table with columns for user_uid, tokens, cost, and latency metrics, including a unique index on user_uid. Wire `accumulate_usage` into `enhance_ticket` and `generate_plan` to capture per-request AI usage, persist totals via `add_issue_usage` in both `IssueCreateService` and `PlanningReportService`, and expose aggregated usage as metric cards through `IssueTrackerService.collect_metrics`. Update planning API docs summary to reflect the new phased implementation document format.
This commit is contained in:
@@ -50,6 +50,8 @@ export class PlanningGenerator {
|
||||
|
||||
poll(statusUrl, ui) {
|
||||
return JobPoller.run(statusUrl, {
|
||||
intervalMs: 2000,
|
||||
maxAttempts: 400,
|
||||
onDone: (status) => {
|
||||
if (ui.status) ui.status.hidden = true;
|
||||
this.renderReport(status, ui);
|
||||
|
||||
Reference in New Issue
Block a user