You've already forked DataMate
refactor(annotation): 移除对 Label Studio Server 的依赖并切换到内嵌编辑器模式
- 移除 LabelStudioClient 和 SyncService 的导入及使用 - 删除与 Label Studio 项目的创建、删除和同步相关代码 - 修改创建数据集映射功能,改为创建 DataMate 标注项目 - 更新删除映射接口,仅进行软删除不再删除 Label Studio 项目 - 修改同步接口为兼容性保留,实际操作为空操作 - 移除 Label Studio 连接诊断功能 - 更新文档说明以反映内嵌编辑器模式的变化
This commit is contained in:
@@ -145,16 +145,16 @@ export default function LabelStudioTextEditor() {
|
||||
};
|
||||
|
||||
const saveFromExport = async (payload: any) => {
|
||||
const taskId = payload?.taskId;
|
||||
const fileId = payload?.fileId;
|
||||
const annotation = payload?.annotation;
|
||||
if (!taskId || !annotation) {
|
||||
message.error("导出标注失败:缺少 taskId/annotation");
|
||||
if (!fileId || !annotation) {
|
||||
message.error("导出标注失败:缺少 fileId/annotation");
|
||||
return;
|
||||
}
|
||||
|
||||
setSaving(true);
|
||||
try {
|
||||
await upsertEditorAnnotationUsingPut(projectId, String(taskId), { annotation });
|
||||
await upsertEditorAnnotationUsingPut(projectId, String(fileId), { annotation });
|
||||
message.success("标注已保存");
|
||||
await loadTasks(true);
|
||||
} catch (e) {
|
||||
@@ -272,7 +272,7 @@ export default function LabelStudioTextEditor() {
|
||||
返回
|
||||
</Button>
|
||||
<Typography.Title level={4} style={{ margin: 0 }}>
|
||||
标注(内嵌编辑器)
|
||||
标注
|
||||
</Typography.Title>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user