fix: lazy init local inference runtime in router instead of app start (#8656)
This commit is contained in:
@@ -92,7 +92,8 @@ const i18n = defineMessages({
|
||||
},
|
||||
tooManyTools: {
|
||||
id: 'chatInput.tooManyTools',
|
||||
defaultMessage: 'Too many tools can degrade performance.\nTool count: {toolCount} (recommend: {recommended})',
|
||||
defaultMessage:
|
||||
'Too many tools can degrade performance.\nTool count: {toolCount} (recommend: {recommended})',
|
||||
},
|
||||
viewExtensions: {
|
||||
id: 'chatInput.viewExtensions',
|
||||
@@ -572,7 +573,10 @@ export default function ChatInput({
|
||||
if (toolCount !== null && toolCount > TOOLS_MAX_SUGGESTED) {
|
||||
addAlert({
|
||||
type: AlertType.Warning,
|
||||
message: intl.formatMessage(i18n.tooManyTools, { toolCount, recommended: TOOLS_MAX_SUGGESTED }),
|
||||
message: intl.formatMessage(i18n.tooManyTools, {
|
||||
toolCount,
|
||||
recommended: TOOLS_MAX_SUGGESTED,
|
||||
}),
|
||||
action: {
|
||||
text: intl.formatMessage(i18n.viewExtensions),
|
||||
onClick: () => setView('extensions'),
|
||||
@@ -1567,7 +1571,9 @@ export default function ChatInput({
|
||||
<p className="text-sm text-text-primary truncate" title={file.name}>
|
||||
{file.name}
|
||||
</p>
|
||||
<p className="text-xs text-text-secondary">{file.type || intl.formatMessage(i18n.unknownType)}</p>
|
||||
<p className="text-xs text-text-secondary">
|
||||
{file.type || intl.formatMessage(i18n.unknownType)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -1683,7 +1689,9 @@ export default function ChatInput({
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
{recipe ? intl.formatMessage(i18n.viewEditRecipe) : intl.formatMessage(i18n.createRecipeFromSession)}
|
||||
{recipe
|
||||
? intl.formatMessage(i18n.viewEditRecipe)
|
||||
: intl.formatMessage(i18n.createRecipeFromSession)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,9 @@ const CustomProviderCard = memo(function CustomProviderCard({ onClick }: { onCli
|
||||
<Plus className="w-8 h-8 text-gray-400 mb-2" />
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400 text-center">
|
||||
<div className="font-medium">{intl.formatMessage(i18n.addProvider)}</div>
|
||||
<div className="text-xs text-gray-500 mt-1">{intl.formatMessage(i18n.fromTemplateOrManual)}</div>
|
||||
<div className="text-xs text-gray-500 mt-1">
|
||||
{intl.formatMessage(i18n.fromTemplateOrManual)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -277,7 +279,9 @@ function ProviderCards({
|
||||
|
||||
const editable = editingProvider ? editingProvider.isEditable : true;
|
||||
const title = editingProvider
|
||||
? (editable ? intl.formatMessage(i18n.editProvider) : intl.formatMessage(i18n.configureProvider))
|
||||
? editable
|
||||
? intl.formatMessage(i18n.editProvider)
|
||||
: intl.formatMessage(i18n.configureProvider)
|
||||
: intl.formatMessage(i18n.addProviderTitle);
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user