Skip to content

Commit

Permalink
format: make the code prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 9, 2025
1 parent 7e7f1cb commit 2876ca1
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 91 deletions.
6 changes: 5 additions & 1 deletion apps/app/actions/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ const aiPrompt = `
`;
export type ServerMessage = {
id?: number;
name?: "should_continue" | "workspace_form" | "project_form"| "onboard_complete";
name?:
| "should_continue"
| "workspace_form"
| "project_form"
| "onboard_complete";
role: "user" | "assistant";
content: string;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/app/actions/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const onboardingComplete = async () => {
return { success: false };
}

return {success:true}
return { success: true };
} catch (error) {
return { success: false };
}
Expand Down
3 changes: 1 addition & 2 deletions apps/app/components/custom/onboarding/chatbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ export default function Chatbox() {

useEffect(() => {
const fetchAiGreeting = async () => {
const response = await sendMessage({ prompt:"onboard me"});
const response = await sendMessage({ prompt: "onboard me" });
setMessages((currentMessages) => [response, ...currentMessages]);
(async () => {

const response = await sendMessage({ prompt: "should we continue?" });
setMessages((currentMessages) => [...currentMessages, response]);
})();
Expand Down
19 changes: 11 additions & 8 deletions apps/app/components/custom/onboarding/onboard-complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ import { onboardingComplete } from "@/actions/session";
import { redirect } from "next/navigation";

export default async function OnboardComplete() {
const res = await onboardingComplete()
if(res.success){
redirect("/settings")
}
const res = await onboardingComplete();
if (res.success) {
redirect("/settings");
}
return (
<div>
<h1 className="text-lg text-neutral-400">Your onbaording has been completed </h1>
</div>);
}
<div>
<h1 className="text-lg text-neutral-400">
Your onbaording has been completed{" "}
</h1>
</div>
);
}
2 changes: 1 addition & 1 deletion apps/app/components/custom/onboarding/workspace-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function WorkspaceForm({
useEffect(() => {
(async () => {
if (hasWorkspace) {
console.log("hehe")
console.log("hehe");
const project = await sendMessage({
prompt: `call project form with workspaceId:${workspaceId}`,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/ui/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ export const NonMemoizedMarkdown = ({ children }: { children: string }) => {

export const Markdown = React.memo(
NonMemoizedMarkdown,
(prevProps, nextProps) => prevProps.children === nextProps.children
(prevProps, nextProps) => prevProps.children === nextProps.children,
);
100 changes: 23 additions & 77 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 2876ca1

Please sign in to comment.