Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chentong7 committed Dec 18, 2024
1 parent 05e01ab commit 73717f3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 61 deletions.
1 change: 0 additions & 1 deletion examples/apps/ai-collab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@fluidframework/odsp-client": "workspace:~",
"@fluidframework/presence": "workspace:~",
"@fluidframework/tinylicious-client": "workspace:~",
"@fluidframework/telemetry-utils": "workspace:~",
"@fluidframework/tree": "workspace:~",
"@iconify/react": "^5.0.2",
"@microsoft/microsoft-graph-client": "^3.0.7",
Expand Down
3 changes: 1 addition & 2 deletions examples/apps/ai-collab/src/app/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
type PresenceStates,
type PresenceStatesSchema,
} from "@fluidframework/presence/alpha";
import { v4 as uuid } from "uuid";
import { getProfilePhoto } from "@/infra/authHelper";

export type User = {
Expand All @@ -26,7 +25,7 @@ export type UserPresence = PresenceStates<typeof statesSchema>;

// Takes a presence object and returns the user presence object that contains the shared object states
export function buildUserPresence(presence: IPresence): UserPresence {
const states = presence.getStates(`name:user-avatar-states-${uuid()}`, statesSchema);
const states = presence.getStates(`name:user-avatar-states`, statesSchema);
return states;
}

Expand Down
16 changes: 0 additions & 16 deletions examples/apps/ai-collab/src/app/tinylicious.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import { TinyliciousClient } from "@fluidframework/tinylicious-client";
import { IFluidContainer, type ContainerSchema } from "fluid-framework";
import { createDevtoolsLogger, initializeDevtools } from "@fluidframework/devtools/internal";
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";

const tinyliciousClient = new TinyliciousClient({});

Expand All @@ -27,20 +25,6 @@ export async function createContainer<T extends ContainerSchema>(
containerSchema: T,
): Promise<IFluidContainer<T>> {
const { container } = await tinyliciousClient.createContainer(containerSchema, "2");
const baseLogger = createChildLogger();

// Wrap telemetry logger for use with Devtools
const devtoolsLogger = createDevtoolsLogger(baseLogger);
// Initialize Devtools
initializeDevtools({
logger: devtoolsLogger,
initialContainers: [
{
container,
containerKey: "ai collab container",
},
],
});
return container;
}

Expand Down
64 changes: 25 additions & 39 deletions examples/apps/ai-collab/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,27 @@
{
"extends": "../../../common/build/build-common/tsconfig.node16.json",
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": [
"./src/*"
]
},
"allowJs": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules",
".next"
]
"extends": "../../../common/build/build-common/tsconfig.node16.json",
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next",
},
],
"paths": {
"@/*": ["./src/*"],
},
"allowJs": true,
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", ".next"],
}
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73717f3

Please sign in to comment.