mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
chore: remove chats experiment (#18535)
This commit is contained in:
@@ -818,13 +818,6 @@ class ApiMethods {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
getDeploymentLLMs = async (): Promise<TypesGen.LanguageModelConfig> => {
|
||||
const response = await this.axios.get<TypesGen.LanguageModelConfig>(
|
||||
"/api/v2/deployment/llms",
|
||||
);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
getOrganizationIdpSyncClaimFieldValues = async (
|
||||
organization: string,
|
||||
field: string,
|
||||
@@ -2584,23 +2577,6 @@ class ApiMethods {
|
||||
markAllInboxNotificationsAsRead = async () => {
|
||||
await this.axios.put<void>("/api/v2/notifications/inbox/mark-all-as-read");
|
||||
};
|
||||
|
||||
createChat = async () => {
|
||||
const res = await this.axios.post<TypesGen.Chat>("/api/v2/chats");
|
||||
return res.data;
|
||||
};
|
||||
|
||||
getChats = async () => {
|
||||
const res = await this.axios.get<TypesGen.Chat[]>("/api/v2/chats");
|
||||
return res.data;
|
||||
};
|
||||
|
||||
getChatMessages = async (chatId: string) => {
|
||||
const res = await this.axios.get<TypesGen.ChatMessage[]>(
|
||||
`/api/v2/chats/${chatId}/messages`,
|
||||
);
|
||||
return res.data;
|
||||
};
|
||||
}
|
||||
|
||||
// Experimental API methods call endpoints under the /api/experimental/ prefix.
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import { API } from "api/api";
|
||||
import type { QueryClient } from "react-query";
|
||||
|
||||
export const createChat = (queryClient: QueryClient) => {
|
||||
return {
|
||||
mutationFn: API.createChat,
|
||||
onSuccess: async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ["chats"] });
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export const getChats = () => {
|
||||
return {
|
||||
queryKey: ["chats"],
|
||||
queryFn: API.getChats,
|
||||
};
|
||||
};
|
||||
|
||||
export const getChatMessages = (chatID: string) => {
|
||||
return {
|
||||
queryKey: ["chatMessages", chatID],
|
||||
queryFn: () => API.getChatMessages(chatID),
|
||||
};
|
||||
};
|
||||
@@ -39,10 +39,3 @@ export const deploymentIdpSyncFieldValues = (field: string) => {
|
||||
queryFn: () => API.getDeploymentIdpSyncFieldValues(field),
|
||||
};
|
||||
};
|
||||
|
||||
export const deploymentLanguageModels = () => {
|
||||
return {
|
||||
queryKey: ["deployment", "llms"],
|
||||
queryFn: API.getDeploymentLLMs,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,12 +31,6 @@ export const RBACResourceActions: Partial<
|
||||
create: "create new audit log entries",
|
||||
read: "read audit logs",
|
||||
},
|
||||
chat: {
|
||||
create: "create a chat",
|
||||
delete: "delete a chat",
|
||||
read: "read a chat",
|
||||
update: "update a chat",
|
||||
},
|
||||
crypto_key: {
|
||||
create: "create crypto keys",
|
||||
delete: "delete crypto keys",
|
||||
|
||||
Generated
-47
@@ -311,28 +311,6 @@ export interface ChangePasswordWithOneTimePasscodeRequest {
|
||||
readonly one_time_passcode: string;
|
||||
}
|
||||
|
||||
// From codersdk/chat.go
|
||||
export interface Chat {
|
||||
readonly id: string;
|
||||
readonly created_at: string;
|
||||
readonly updated_at: string;
|
||||
readonly title: string;
|
||||
}
|
||||
|
||||
// From codersdk/chat.go
|
||||
export interface ChatMessage {
|
||||
readonly id: string;
|
||||
readonly createdAt?: Record<string, string>;
|
||||
readonly content: string;
|
||||
readonly role: string;
|
||||
// external type "github.com/kylecarbs/aisdk-go.Part", to include this type the package must be explicitly included in the parsing
|
||||
readonly parts?: readonly unknown[];
|
||||
// empty interface{} type, falling back to unknown
|
||||
readonly annotations?: readonly unknown[];
|
||||
// external type "github.com/kylecarbs/aisdk-go.Attachment", to include this type the package must be explicitly included in the parsing
|
||||
readonly experimental_attachments?: readonly unknown[];
|
||||
}
|
||||
|
||||
// From codersdk/client.go
|
||||
export const CoderDesktopTelemetryHeader = "Coder-Desktop-Telemetry";
|
||||
|
||||
@@ -354,14 +332,6 @@ export interface ConvertLoginRequest {
|
||||
readonly password: string;
|
||||
}
|
||||
|
||||
// From codersdk/chat.go
|
||||
export interface CreateChatMessageRequest {
|
||||
readonly model: string;
|
||||
// external type "github.com/kylecarbs/aisdk-go.Message", to include this type the package must be explicitly included in the parsing
|
||||
readonly message: unknown;
|
||||
readonly thinking: boolean;
|
||||
}
|
||||
|
||||
// From codersdk/users.go
|
||||
export interface CreateFirstUserRequest {
|
||||
readonly email: string;
|
||||
@@ -726,7 +696,6 @@ export interface DeploymentValues {
|
||||
readonly disable_password_auth?: boolean;
|
||||
readonly support?: SupportConfig;
|
||||
readonly external_auth?: SerpentStruct<ExternalAuthConfig[]>;
|
||||
readonly ai?: SerpentStruct<AIConfig>;
|
||||
readonly config_ssh?: SSHConfig;
|
||||
readonly wgtunnel_host?: string;
|
||||
readonly disable_owner_workspace_exec?: boolean;
|
||||
@@ -834,7 +803,6 @@ export const EntitlementsWarningHeader = "X-Coder-Entitlements-Warning";
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export type Experiment =
|
||||
| "agentic-chat"
|
||||
| "auto-fill-parameters"
|
||||
| "example"
|
||||
| "notifications"
|
||||
@@ -843,7 +811,6 @@ export type Experiment =
|
||||
| "workspace-usage";
|
||||
|
||||
export const Experiments: Experiment[] = [
|
||||
"agentic-chat",
|
||||
"auto-fill-parameters",
|
||||
"example",
|
||||
"notifications",
|
||||
@@ -1259,18 +1226,6 @@ export type JobErrorCode = "REQUIRED_TEMPLATE_VARIABLES";
|
||||
|
||||
export const JobErrorCodes: JobErrorCode[] = ["REQUIRED_TEMPLATE_VARIABLES"];
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export interface LanguageModel {
|
||||
readonly id: string;
|
||||
readonly display_name: string;
|
||||
readonly provider: string;
|
||||
}
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export interface LanguageModelConfig {
|
||||
readonly models: readonly LanguageModel[];
|
||||
}
|
||||
|
||||
// From codersdk/licenses.go
|
||||
export interface License {
|
||||
readonly id: number;
|
||||
@@ -2186,7 +2141,6 @@ export type RBACResource =
|
||||
| "assign_org_role"
|
||||
| "assign_role"
|
||||
| "audit_log"
|
||||
| "chat"
|
||||
| "crypto_key"
|
||||
| "debug_info"
|
||||
| "deployment_config"
|
||||
@@ -2226,7 +2180,6 @@ export const RBACResources: RBACResource[] = [
|
||||
"assign_org_role",
|
||||
"assign_role",
|
||||
"audit_log",
|
||||
"chat",
|
||||
"crypto_key",
|
||||
"debug_info",
|
||||
"deployment_config",
|
||||
|
||||
Reference in New Issue
Block a user