mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-04 17:20:19 +08:00
Moving the ValidLabel type
This commit is contained in:
@@ -2,15 +2,10 @@ import { Grid } from "@chakra-ui/react";
|
||||
import { forwardRef, useColorMode } from "@chakra-ui/react";
|
||||
import { useMemo } from "react";
|
||||
import { Message } from "src/types/Conversation";
|
||||
import { ValidLabel } from "src/types/Task";
|
||||
|
||||
import { FlaggableElement } from "./FlaggableElement";
|
||||
|
||||
export interface ValidLabel {
|
||||
name: string;
|
||||
display_text: string;
|
||||
help_text: string;
|
||||
}
|
||||
|
||||
export const Messages = ({
|
||||
messages,
|
||||
post_id,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Avatar, HStack, LinkBox, useColorModeValue } from "@chakra-ui/react";
|
||||
import { boolean } from "boolean";
|
||||
import NextLink from "next/link";
|
||||
import { FlaggableElement } from "src/components/FlaggableElement";
|
||||
import type { ValidLabel } from "src/components/Messages";
|
||||
import type { ValidLabel } from "src/types/Task";
|
||||
|
||||
interface Message {
|
||||
text: string;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import type { ValidLabel } from "src/components/Messages";
|
||||
import fetcher from "src/lib/fetcher";
|
||||
import poster from "src/lib/poster";
|
||||
import { BaseTask, TaskResponse } from "src/types/Task";
|
||||
|
||||
@@ -12,6 +12,12 @@ export const enum TaskType {
|
||||
label_assistant_reply = "label_assistant_reply",
|
||||
}
|
||||
|
||||
export interface ValidLabel {
|
||||
name: string;
|
||||
display_text: string;
|
||||
help_text: string;
|
||||
}
|
||||
|
||||
export interface BaseTask {
|
||||
id: string;
|
||||
type: TaskType;
|
||||
@@ -21,4 +27,5 @@ export interface TaskResponse<Task extends BaseTask> {
|
||||
id: string;
|
||||
userId: string;
|
||||
task: Task;
|
||||
valid_labels: ValidLabel[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user