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
858300030c
commit
6d78276049
@ -11,8 +11,8 @@ import RepoVariantSelect from 'features/modelManagerV2/subpanels/ModelPanel/Fiel
|
|||||||
import { addToast } from 'features/system/store/systemSlice';
|
import { addToast } from 'features/system/store/systemSlice';
|
||||||
import { makeToast } from 'features/system/util/makeToast';
|
import { makeToast } from 'features/system/util/makeToast';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
import type { SubmitHandler} from 'react-hook-form';
|
import type { SubmitHandler } from 'react-hook-form';
|
||||||
import {useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useImportAdvancedModelMutation } from 'services/api/endpoints/models';
|
import { useImportAdvancedModelMutation } from 'services/api/endpoints/models';
|
||||||
import type { AnyModelConfig } from 'services/api/types';
|
import type { AnyModelConfig } from 'services/api/types';
|
||||||
|
@ -58,6 +58,14 @@ type DeleteImportModelsResponse =
|
|||||||
type PruneModelImportsResponse =
|
type PruneModelImportsResponse =
|
||||||
paths['/api/v2/models/import']['patch']['responses']['200']['content']['application/json'];
|
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 =
|
export type ScanFolderResponse =
|
||||||
paths['/api/v2/models/scan_folder']['get']['responses']['200']['content']['application/json'];
|
paths['/api/v2/models/scan_folder']['get']['responses']['200']['content']['application/json'];
|
||||||
type ScanFolderArg = operations['scan_for_models']['parameters']['query'];
|
type ScanFolderArg = operations['scan_for_models']['parameters']['query'];
|
||||||
@ -175,6 +183,16 @@ export const modelsApi = api.injectEndpoints({
|
|||||||
},
|
},
|
||||||
invalidatesTags: ['Model', 'ModelImports'],
|
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>({
|
deleteModels: build.mutation<DeleteMainModelResponse, DeleteMainModelArg>({
|
||||||
query: ({ key }) => {
|
query: ({ key }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -20,16 +20,16 @@
|
|||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
"*": ["./src/*"],
|
"*": ["./src/*"]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "*.d.ts", ".storybook/**/*"],
|
"include": ["src/**/*.ts", "src/**/*.tsx", "*.d.ts", ".storybook/**/*"],
|
||||||
"exclude": ["src/services/fixtures/*", "node_modules", "dist"],
|
"exclude": ["src/services/fixtures/*", "node_modules", "dist"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }],
|
"references": [{ "path": "./tsconfig.node.json" }],
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "preserve",
|
"jsx": "preserve"
|
||||||
},
|
},
|
||||||
"esm": true,
|
"esm": true
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user