Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Parker-Stafford committed Oct 8, 2024
1 parent 9e4a5e7 commit 95fc185
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/src/pages/playground/__tests__/playgroundUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("transformSpanAttributesToPlaygroundInstance", () => {
attributes: "invalid json",
};
expect(() => transformSpanAttributesToPlaygroundInstance(span)).toThrow(
"Invalid attributes"
"Invalid span attributes, attributes must be valid JSON"
);
});

Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/playground/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const NUM_MAX_PLAYGROUND_INSTANCES = 2;
export const DEFAULT_CHAT_ROLE = "user";

/**
* Map of {@link ChatMessageRole}.to potential role values.
* Map of {@link ChatMessageRole} to potential role values.
* Used to map roles to a canonical role.
*/
export const ChatRoleMap: Record<ChatMessageRole, string[]> = {
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/playground/playgroundUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function transformSpanAttributesToPlaygroundInstance(
span.attributes
);
if (parseError) {
throw new Error("Invalid attributes");
throw new Error("Invalid span attributes, attributes must be valid JSON");
}
const { data, success } = llmAttributesSchema.safeParse(parsedAttributes);
if (!success) {
Expand Down
11 changes: 0 additions & 11 deletions app/src/pages/playground/types.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { spanPlaygroundPageLoaderQuery$data } from "./__generated__/spanPlaygroundPageLoaderQuery.graphql";

export interface PlaygroundInstanceProps {
/**
* Multiple playground instances are supported.
* The id is used to identify the instance.
*/
playgroundInstanceId: number;
}

/**
* The type of a span that is fetched to pre-populate the playground.
* This span gets fetched when navigating from a span to the playground, used for span replay.
*/
export type PlaygroundSpan = Extract<
spanPlaygroundPageLoaderQuery$data["span"],
{ __typename: "Span" }
>;

0 comments on commit 95fc185

Please sign in to comment.