Skip to content

Commit

Permalink
fix call function, cleanup aiplClient dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjosephtaylor committed Sep 7, 2024
1 parent a8d4366 commit 064eb36
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 306 deletions.
56 changes: 0 additions & 56 deletions src/client/AiplClientEvents.ts

This file was deleted.

23 changes: 1 addition & 22 deletions src/client/AiplClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,7 @@ import { log } from "./log";

export type AiplClient = ReturnType<typeof createAiplClient>;

// export type Capabilities = {};

// export type AiplClientContext = ReturnType<typeof createClientContext>;

// export const createClientContext = (init: AiplClientState = {}) => {
// const [_, update, get] = createState<AiplClientState>(init);

// return Object.freeze({ update, get });
// };

export const createAiplClient = (
props: Partial<{ authToken: string; url: string }> = {}
) => {
const { url } = props;
// const ctx = createClientContext({ homebaseUrl: url });

// ctx.update((s) => {
// s.ws = getAppState().ws;
// });

// connectWs(ctx);

export const createAiplClient = (props: Partial<{}> = {}) => {
return {
ask: async (props: AppMessageMap["chat:ask"]) => {
const result = await AppMessagesState.call("chat:ask", props);
Expand Down
39 changes: 0 additions & 39 deletions src/client/addReturnListener.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/client/authTokenToAuthHeader.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/client/fetchBackend.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/client/getBackendUser.ts

This file was deleted.

27 changes: 0 additions & 27 deletions src/client/papAuth.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/client/sendWsAuth.ts

This file was deleted.

35 changes: 0 additions & 35 deletions src/client/setupWsOnMessage.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/client/userLogin.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/client/waitForWs.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/state/ws/call.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AppMessageMap } from "ai-worker-common";
import { addReturnListener } from "../../client/addReturnListener";
import { addReturnListener } from "../data-object/addReturnListener";
import { dispatch } from "./AppMessagesState";

export const call = <T extends keyof AppMessageMap>(
Expand Down

0 comments on commit 064eb36

Please sign in to comment.