fix type errs
This commit is contained in:
parent
19a25ff65f
commit
8f076bfc04
3 changed files with 72 additions and 6 deletions
66
docs/static/schemas/config.json
vendored
66
docs/static/schemas/config.json
vendored
|
|
@ -1629,6 +1629,72 @@
|
|||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"enum": ["discord"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"params": {
|
||||
"properties": {
|
||||
"discordKey": {
|
||||
"type": "string",
|
||||
"description": "Your Discord bot token to access the Discord API. Required to fetch messages from servers."
|
||||
},
|
||||
"guildId": {
|
||||
"type": "string",
|
||||
"description": "The ID of the guild (server) from which to fetch channels and messages."
|
||||
},
|
||||
"channels": {
|
||||
"type": "array",
|
||||
"description": "A list of channel objects to search for messages",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The unique ID of the channel"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the channel"
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["discordKey"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"params": {
|
||||
"required": ["guildId"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"params": {
|
||||
"required": ["channels"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ export class QuickEdit {
|
|||
|
||||
const searchResults = this.miniSearch.search(
|
||||
searchQuery,
|
||||
) as FileMiniSearchResult[];
|
||||
) as unknown as FileMiniSearchResult[];
|
||||
|
||||
if (searchResults.length > 0) {
|
||||
quickPick.items = searchResults
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import {
|
|||
ArrowLeftIcon,
|
||||
ExclamationCircleIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { useSelector } from "react-redux";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { vscBackground } from "../../components";
|
||||
import { ROUTES } from "../../util/navigation";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState } from "../../redux/store";
|
||||
import { ROUTES } from "../../util/navigation";
|
||||
|
||||
export default function ConfigErrorPage() {
|
||||
const navigate = useNavigate();
|
||||
|
|
@ -27,16 +27,16 @@ export default function ConfigErrorPage() {
|
|||
<span className="text-sm font-bold m-2 inline-block">Chat</span>
|
||||
</div>
|
||||
|
||||
<div className="px-4 divide-y-2 divide-y divide-zinc-700 divide-solid divide-x-0 gap-2">
|
||||
<div className="px-4 divide-y-2 divide-zinc-700 divide-solid divide-x-0 gap-2">
|
||||
<div className="py-5">
|
||||
<h3 className="text-xl mb-2 mt-0">Config Errors</h3>
|
||||
<p className="mb-4 text-md">
|
||||
Please resolve the following errors in your config.json file.
|
||||
</p>
|
||||
<div className="flex flex-col gap-5">
|
||||
{configError && configError.errors.length > 0 ? (
|
||||
{configError && configError.length > 0 ? (
|
||||
<ul className="list-none space-y-4 p-0 m-0">
|
||||
{configError.errors.map((error, index) => (
|
||||
{configError.map((error, index) => (
|
||||
<li
|
||||
key={index}
|
||||
className="text-sm text-red-800 bg-red-100 rounded-md shadow-md flex items-start p-2"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue