mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 21:53:04 -04:00
Fixes
This commit is contained in:
parent
8ae44e2ec3
commit
a6e2194804
4 changed files with 4 additions and 4 deletions
|
@ -244,7 +244,7 @@ export default function PluginSettings() {
|
||||||
}));
|
}));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const depMap = React.useMemo(() => {
|
const depMap = useMemo(() => {
|
||||||
const o = {} as Record<string, string[]>;
|
const o = {} as Record<string, string[]>;
|
||||||
for (const plugin in Plugins) {
|
for (const plugin in Plugins) {
|
||||||
const deps = Plugins[plugin].dependencies;
|
const deps = Plugins[plugin].dependencies;
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default async (
|
||||||
}: FurudoSettings,
|
}: FurudoSettings,
|
||||||
repliedMessage?: Message
|
repliedMessage?: Message
|
||||||
): Promise<string> => {
|
): Promise<string> => {
|
||||||
const completion = await fetch("http://localhost:11434/api/chat", {
|
const completion = await fetch("http://127.0.0.1:11434/api/chat", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default definePlugin({
|
||||||
authors: [Devs.AutumnVN],
|
authors: [Devs.AutumnVN],
|
||||||
start() {
|
start() {
|
||||||
(function connect() {
|
(function connect() {
|
||||||
ws = new WebSocket("ws://localhost:24050/websocket/v2");
|
ws = new WebSocket("ws://127.0.0.1:24050/websocket/v2");
|
||||||
ws.addEventListener("error", () => ws.close());
|
ws.addEventListener("error", () => ws.close());
|
||||||
ws.addEventListener("close", () => wsReconnect = setTimeout(connect, 5000));
|
ws.addEventListener("close", () => wsReconnect = setTimeout(connect, 5000));
|
||||||
ws.addEventListener("message", ({ data }) => throttledOnMessage(data));
|
ws.addEventListener("message", ({ data }) => throttledOnMessage(data));
|
||||||
|
|
|
@ -29,7 +29,7 @@ export let socket: WebSocket | undefined;
|
||||||
export function initWs(isManual = false) {
|
export function initWs(isManual = false) {
|
||||||
let wasConnected = isManual;
|
let wasConnected = isManual;
|
||||||
let hasErrored = false;
|
let hasErrored = false;
|
||||||
const ws = socket = new WebSocket(`ws://localhost:${PORT}`);
|
const ws = socket = new WebSocket(`ws://127.0.0.1:${PORT}`);
|
||||||
|
|
||||||
function replyData(data: OutgoingMessage) {
|
function replyData(data: OutgoingMessage) {
|
||||||
ws.send(JSON.stringify(data));
|
ws.send(JSON.stringify(data));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue