Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 16, 2024
1 parent 440b788 commit 8e2eb34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions web-app/src/components/site/indexes/AskIndexes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ import {
useRef,
useState,
} from "react";
import { toast } from "react-hot-toast";
import { API_ENDPOINTS } from "utils/constants";
import { maskDID } from "utils/helper";
import { generateId } from "ai";
import NoIndexes from "../NoIndexes";
import { generateId, nanoid } from "ai";

export interface ChatProps extends ComponentProps<"div"> {
initialMessages?: Message[];
Expand Down Expand Up @@ -439,6 +438,9 @@ const AskIndexes: FC<AskIndexesProps> = ({ chatID, sources }) => {
contextMessage={getChatContextMessage()}
onSubmit={async (value) => {
sendMessage(value);
trackEvent(CHAT_STARTED, {
type: discoveryType,
});
}}
isLoading={isLoading}
input={input}
Expand Down
3 changes: 1 addition & 2 deletions web-app/src/context/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import toast from "react-hot-toast";
import { AccessControlCondition, Indexes, Users } from "types/entity";
import { DEFAULT_CREATE_INDEX_TITLE } from "utils/constants";
import { v4 as uuidv4 } from "uuid";
import { CancelTokenSource } from "axios";
import { INDEX_CREATED, trackEvent } from "@/services/tracker";

Expand Down Expand Up @@ -371,7 +370,7 @@ export const AppContextProvider = ({ children }: AppContextProviderProps) => {
}, [handleUserProfileChange]);

useEffect(() => {
//const newChatID = uuidv4();
// const newChatID = uuidv4();
const newChatID =
"kjzl6kcym7w8yavyrq0oqt0pziy2aqhu1vqwptjo4m6k4zdn8xy0pebyqt8hk7p";
localStorage.setItem("chatterID", newChatID);
Expand Down

0 comments on commit 8e2eb34

Please sign in to comment.