Files
code-box/component/items/setAiType.tsx
2025-01-26 15:16:39 +08:00

31 lines
838 B
TypeScript

import { EditOutlined, StarTwoTone } from "@ant-design/icons"
import { sendToContentScript } from "@plasmohq/messaging"
import { useStorage } from "@plasmohq/storage/dist/hook"
import { i18n } from "~tools"
export default function SetAiType(props) {
const [aiType, setAiType] = useStorage("app-aiType", (v) =>
v === undefined ? "chatgpt" : v
)
return (
<div className="item">
<span>
<StarTwoTone twoToneColor="#eb2f96" style={{ marginRight: "5px" }} />
AI
</span>
<select
name="custom-aiType"
id="custom-aiType"
value={aiType}
onChange={(e) => setAiType(e.target.value)}>
<option value="deepseek">deepseek</option>
<option value="chatgpt">chatGPT</option>
<option value="kimi">kimi</option>
</select>
</div>
)
}