mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(electron): server side plugin (#3360)
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { Button, FlexWrapper, Input } from '@affine/component';
|
||||
import { SettingRow } from '@affine/component/setting-components';
|
||||
import { SettingWrapper } from '@affine/component/setting-components';
|
||||
import type { PluginUIAdapter } from '@toeverything/plugin-infra/type';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
import { type ReactElement, useCallback } from 'react';
|
||||
|
||||
import { openAIApiKeyAtom } from '../core/hooks';
|
||||
import { conversationHistoryDBName } from '../core/langchain/message-history';
|
||||
|
||||
export const DebugContent: PluginUIAdapter['debugContent'] = () => {
|
||||
export const DebugContent = (): ReactElement => {
|
||||
const [key, setKey] = useAtom(openAIApiKeyAtom);
|
||||
const desc = (
|
||||
<>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { PluginUIAdapter } from '@toeverything/plugin-infra/type';
|
||||
import { createElement } from 'react';
|
||||
|
||||
import { DebugContent } from './debug-content';
|
||||
import { DetailContent } from './detail-content';
|
||||
import { HeaderItem } from './header-item';
|
||||
|
||||
export default {
|
||||
headerItem: props => createElement(HeaderItem, props),
|
||||
detailContent: props => createElement(DetailContent, props),
|
||||
debugContent: props => createElement(DebugContent, props),
|
||||
} satisfies Partial<PluginUIAdapter>;
|
||||
Reference in New Issue
Block a user