File size: 2,937 Bytes
63522a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | import { ConversationStatus } from "#/types/conversation-status";
import { RuntimeStatus } from "#/types/runtime-status";
import { Provider } from "#/types/settings";
export interface ErrorResponse {
error: string;
}
export interface SaveFileSuccessResponse {
message: string;
}
export interface FileUploadSuccessResponse {
uploaded_files: string[];
skipped_files: { name: string; reason: string }[];
}
export interface FeedbackBodyResponse {
message: string;
feedback_id: string;
password: string;
}
export interface FeedbackResponse {
statusCode: number;
body: FeedbackBodyResponse;
}
export interface AuthenticationResponse {
message: string;
login?: string; // Only present when allow list is enabled
}
export interface Feedback {
version: string;
email: string;
token: string;
polarity: "positive" | "negative";
permissions: "public" | "private";
trajectory: unknown[];
}
export interface GetVSCodeUrlResponse {
vscode_url: string | null;
error?: string;
}
export interface GetTrajectoryResponse {
trajectory: unknown[] | null;
error?: string;
}
export interface RepositorySelection {
selected_repository: string | null;
selected_branch: string | null;
git_provider: Provider | null;
}
export type ConversationTrigger =
| "resolver"
| "gui"
| "suggested_task"
| "microagent_management"
| "automation";
export interface Conversation {
conversation_id: string;
title: string;
selected_repository: string | null;
selected_branch: string | null;
git_provider: Provider | null;
last_updated_at: string;
created_at: string;
status: ConversationStatus;
runtime_status: RuntimeStatus | null;
trigger?: ConversationTrigger;
url: string | null;
session_api_key: string | null;
pr_number?: number[] | null;
conversation_version?: "V0" | "V1";
sub_conversation_ids?: string[];
public?: boolean;
llm_model?: string | null;
}
export interface ResultSet<T> {
results: T[];
next_page_id: string | null;
}
/**
* @deprecated Use AgentServerGitChangeStatus for new code. This type is maintained for backward compatibility with V0 API.
*/
export type GitChangeStatus = "M" | "A" | "D" | "R" | "U";
export type AgentServerGitChangeStatus =
| "MOVED"
| "ADDED"
| "DELETED"
| "UPDATED";
export interface GitChange {
status: GitChangeStatus;
path: string;
}
export interface GitChangeDiff {
modified: string;
original: string;
}
export interface GitCommit {
sha: string;
shortSha: string;
subject: string;
author: string;
// ISO 8601 author date with UTC offset (git log %aI).
timestamp: string;
}
export interface GitCommitsPage {
commits: GitCommit[];
hasMore: boolean;
}
export interface InputMetadata {
name: string;
description: string;
}
export interface IOption<T> {
label: string;
value: T;
}
export type GetFilesResponse = string[];
export interface GetFileResponse {
code: string;
}
|