run the formatter

This commit is contained in:
Elijah R 2024-07-29 15:19:04 -04:00
parent f2a8946e3f
commit b78d596c9d
8 changed files with 23 additions and 27 deletions

View file

@ -53,7 +53,6 @@ export interface MSAgentPlayAnimationMessage extends MSAgentProtocolMessage {
}; };
} }
export interface MSAgentSendImageMessage extends MSAgentProtocolMessage { export interface MSAgentSendImageMessage extends MSAgentProtocolMessage {
op: MSAgentProtocolMessageType.SendImage; op: MSAgentProtocolMessageType.SendImage;
data: { data: {

View file

@ -52,7 +52,7 @@ export class MSAgentChatRoom {
} }
}); });
client.on('join', () => { client.on('join', () => {
let agent = this.agents.find(a => a.filename === client.agent)!; let agent = this.agents.find((a) => a.filename === client.agent)!;
let initmsg: MSAgentInitMessage = { let initmsg: MSAgentInitMessage = {
op: MSAgentProtocolMessageType.Init, op: MSAgentProtocolMessageType.Init,
data: { data: {
@ -66,7 +66,7 @@ export class MSAgentChatRoom {
username: c.username!, username: c.username!,
agent: c.agent!, agent: c.agent!,
admin: c.admin, admin: c.admin,
animations: this.agents.find(a => a.filename === c.agent)!.animations animations: this.agents.find((a) => a.filename === c.agent)!.animations
}; };
}) })
} }
@ -107,7 +107,7 @@ export class MSAgentChatRoom {
} }
this.discord?.logMsg(client.username!, message); this.discord?.logMsg(client.username!, message);
}); });
client.on('animation', async anim => { client.on('animation', async (anim) => {
let msg: MSAgentAnimationMessage = { let msg: MSAgentAnimationMessage = {
op: MSAgentProtocolMessageType.PlayAnimation, op: MSAgentProtocolMessageType.PlayAnimation,
data: { data: {

View file

@ -1,4 +1,4 @@
export const Config = { export const Config = {
// The server address for the webapp to connect to. The below default is the same address the webapp is hosted at. // The server address for the webapp to connect to. The below default is the same address the webapp is hosted at.
serverAddress: `${window.location.protocol}//${window.location.host}` serverAddress: `https://msagent.chat`
}; };

View file

@ -84,7 +84,7 @@ html {
min-width: 250px; min-width: 250px;
@media screen and (min-width: 500px) { @media screen and (min-width: 500px) {
min-width: 500px; min-width: 500px;
}; }
} }
#logonWindowLogo { #logonWindowLogo {
@ -269,7 +269,6 @@ button {
user-select: none; user-select: none;
} }
#animWindow { #animWindow {
#animSelectContainer { #animSelectContainer {
display: flex; display: flex;

View file

@ -128,7 +128,7 @@
</div> </div>
</div> </div>
<div class="window-body"> <div class="window-body">
<label for="animSelect">Animation:</label><br> <label for="animSelect">Animation:</label><br />
<div id="animSelectContainer"> <div id="animSelectContainer">
<select id="animSelect"></select> <select id="animSelect"></select>
<button id="animPlayBtn">Play</button> <button id="animPlayBtn">Play</button>

View file

@ -1,18 +1,16 @@
import { MSAgentClient } from "./client.js"; import { MSAgentClient } from './client.js';
export function InitCommands() { export function InitCommands() {}
}
export function RunCommand(command: string, room: MSAgentClient) { export function RunCommand(command: string, room: MSAgentClient) {
let arr = command.split(' '); let arr = command.split(' ');
let cmd = arr[0]; let cmd = arr[0];
let args = arr.slice(1); let args = arr.slice(1);
switch (cmd) { switch (cmd) {
case '/anim': { case '/anim': {
let anim = args.join(' '); let anim = args.join(' ');
room.animation(anim); room.animation(anim);
break; break;
} }
} }
} }

View file

@ -24,7 +24,7 @@ const elements = {
roomSettingsWindow: document.getElementById('roomSettingsWindow') as HTMLDivElement, roomSettingsWindow: document.getElementById('roomSettingsWindow') as HTMLDivElement,
animWindow: document.getElementById('animWindow') as HTMLDivElement, animWindow: document.getElementById('animWindow') as HTMLDivElement,
animSelect: document.getElementById('animSelect') as HTMLSelectElement, animSelect: document.getElementById('animSelect') as HTMLSelectElement,
animPlayBtn: document.getElementById('animPlayBtn') as HTMLButtonElement, animPlayBtn: document.getElementById('animPlayBtn') as HTMLButtonElement
}; };
let Room: MSAgentClient; let Room: MSAgentClient;