Открыть боковую панель
Teknokomo
universo-react
Коммиты
5c861939
Не подтверждена
Коммит
5c861939
создал
Апр 29, 2024
по автору
pengx17
Просмотр файлов
fix(core): show toast for requestRunInEdgeless (#6715)
владелец
7c5a259e
Изменения
3
Скрыть пробелы
Построчно
Рядом
packages/frontend/component/src/ui/notification/types.ts
Просмотр файла @
5c861939
...
@@ -14,7 +14,7 @@ export interface Notification {
...
@@ -14,7 +14,7 @@ export interface Notification {
foreground
?:
string
;
foreground
?:
string
;
alignMessage
?:
'
title
'
|
'
icon
'
;
alignMessage
?:
'
title
'
|
'
icon
'
;
action
?:
{
action
?:
{
label
:
string
;
label
:
ReactNode
;
onClick
:
(()
=>
void
)
|
(()
=>
Promise
<
void
>
);
onClick
:
(()
=>
void
)
|
(()
=>
Promise
<
void
>
);
buttonProps
?:
ButtonProps
;
buttonProps
?:
ButtonProps
;
/**
/**
...
...
packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/provider.ts
→
packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/provider.ts
x
Просмотр файла @
5c861939
import
{
notify
}
from
'
@affine/component
'
;
import
{
authAtom
,
openSettingModalAtom
}
from
'
@affine/core/atoms
'
;
import
{
authAtom
,
openSettingModalAtom
}
from
'
@affine/core/atoms
'
;
import
{
mixpanel
}
from
'
@affine/core/utils
'
;
import
{
mixpanel
}
from
'
@affine/core/utils
'
;
import
{
getBaseUrl
}
from
'
@affine/graphql
'
;
import
{
getBaseUrl
}
from
'
@affine/graphql
'
;
import
{
Trans
}
from
'
@affine/i18n
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
AIProvider
}
from
'
@blocksuite/presets
'
;
import
{
AIProvider
}
from
'
@blocksuite/presets
'
;
import
{
getCurrentStore
}
from
'
@toeverything/infra
'
;
import
{
getCurrentStore
}
from
'
@toeverything/infra
'
;
...
@@ -388,4 +390,12 @@ export function setupAIProvider() {
...
@@ -388,4 +390,12 @@ export function setupAIProvider() {
openModal
:
true
,
openModal
:
true
,
}));
}));
}
);
}
);
AIProvider.slots.requestRunInEdgeless.on(() =>
{
notify
.
warning
({
title
:
(
<
Trans
i18nKey
=
"com.affine.ai.action.edgeless-only.dialog-title"
/>
),
});
}
);
}
}
packages/frontend/i18n/src/resources/en.json
Просмотр файла @
5c861939
...
@@ -1311,5 +1311,6 @@
...
@@ -1311,5 +1311,6 @@
"com.affine.ai.login-required.dialog-title"
:
"Sign in to Continue"
,
"com.affine.ai.login-required.dialog-title"
:
"Sign in to Continue"
,
"com.affine.ai.login-required.dialog-content"
:
"To use AFFiNE AI, please sign in to your AFFiNE Cloud account."
,
"com.affine.ai.login-required.dialog-content"
:
"To use AFFiNE AI, please sign in to your AFFiNE Cloud account."
,
"com.affine.ai.login-required.dialog-confirm"
:
"Sign in"
,
"com.affine.ai.login-required.dialog-confirm"
:
"Sign in"
,
"com.affine.ai.login-required.dialog-cancel"
:
"Cancel"
"com.affine.ai.login-required.dialog-cancel"
:
"Cancel"
,
"com.affine.ai.action.edgeless-only.dialog-title"
:
"Please switch to edgeless mode"
}
}
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать