import { useUserData } from "@/hooks/useUserData";

const HiddenFields = ['email', 'picture', 'audio'];

/**
 * 解析器ID格式为 "naive:General"，我们只需要 "naive" 部分
 * "parser_ids": "naive:General,qa:Q&A,resume:Resume,manual:Manual,
 * table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,
 * picture:Picture,one:One,audio:Audio,email:Email,tag:Tag",
 * @returns 解析器ID列表
 */
export function useSelectChunkMethodList() {
  const {tenantInfo} = useUserData();
  const parserList = tenantInfo?.parser_ids?.split(',') || [];
  // 解析器ID格式为 "naive:General"，我们只需要 "naive" 部分
  const parserIds = parserList.map((x) => x.split(':')[0]);
  // const parserLabels = parserList.map((x) => x.split(':')[1]);

  const filteredParserIds = parserIds.filter((x) => !HiddenFields.some((y) => y === x));
  // return filteredParserIds.map((x) => ({
  //   value: x,
  //   label: parserLabels[parserIds.indexOf(x)],
  // }));
  return filteredParserIds
}

// export function useSelectEmbeddingModelOptions() {
//   const allOptions = useSelectLlmOptionsByModelType();
//   return allOptions[LlmModelType.Embedding];
// }
