mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(ui): lint
This commit is contained in:
parent
1436a5f295
commit
98d60e7db5
@ -11,8 +11,8 @@ import RepoVariantSelect from 'features/modelManagerV2/subpanels/ModelPanel/Fiel
|
||||
import { addToast } from 'features/system/store/systemSlice';
|
||||
import { makeToast } from 'features/system/util/makeToast';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import type { SubmitHandler} from 'react-hook-form';
|
||||
import {useForm } from 'react-hook-form';
|
||||
import type { SubmitHandler } from 'react-hook-form';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useImportAdvancedModelMutation } from 'services/api/endpoints/models';
|
||||
import type { AnyModelConfig } from 'services/api/types';
|
||||
|
@ -58,6 +58,14 @@ type DeleteImportModelsResponse =
|
||||
type PruneModelImportsResponse =
|
||||
paths['/api/v2/models/import']['patch']['responses']['200']['content']['application/json'];
|
||||
|
||||
type ImportAdvancedModelArg = {
|
||||
source: NonNullable<operations['import_model']['requestBody']['content']['application/json']['source']>;
|
||||
config: NonNullable<operations['import_model']['requestBody']['content']['application/json']['config']>;
|
||||
};
|
||||
|
||||
type ImportAdvancedModelResponse =
|
||||
paths['/api/v2/models/import']['post']['responses']['201']['content']['application/json'];
|
||||
|
||||
export type ScanFolderResponse =
|
||||
paths['/api/v2/models/scan_folder']['get']['responses']['200']['content']['application/json'];
|
||||
type ScanFolderArg = operations['scan_for_models']['parameters']['query'];
|
||||
@ -175,6 +183,16 @@ export const modelsApi = api.injectEndpoints({
|
||||
},
|
||||
invalidatesTags: ['Model', 'ModelImports'],
|
||||
}),
|
||||
importAdvancedModel: build.mutation<ImportAdvancedModelResponse, ImportAdvancedModelArg>({
|
||||
query: ({ source, config }) => {
|
||||
return {
|
||||
url: buildModelsUrl('install'),
|
||||
method: 'POST',
|
||||
body: { source, config },
|
||||
};
|
||||
},
|
||||
invalidatesTags: ['Model', 'ModelImports'],
|
||||
}),
|
||||
deleteModels: build.mutation<DeleteMainModelResponse, DeleteMainModelArg>({
|
||||
query: ({ key }) => {
|
||||
return {
|
||||
|
@ -20,16 +20,16 @@
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"*": ["./src/*"],
|
||||
},
|
||||
"*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "*.d.ts", ".storybook/**/*"],
|
||||
"exclude": ["src/services/fixtures/*", "node_modules", "dist"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }],
|
||||
"ts-node": {
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve",
|
||||
"jsx": "preserve"
|
||||
},
|
||||
"esm": true,
|
||||
},
|
||||
"esm": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user