Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

✈️ Plane#488

Merged
awtkns merged 11 commits intomainfrom
plane
May 9, 2023
Merged

✈️ Plane#488
awtkns merged 11 commits intomainfrom
plane

Conversation

@awtkns
Copy link
Copy Markdown
Contributor

@awtkns awtkns commented May 9, 2023

refactoring done on plane :)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2023 6:19pm

awtkns added 2 commits May 9, 2023 18:27
# Conflicts:
#	src/components/AutonomousAgent.ts
#	src/components/Drawer.tsx
Comment thread src/components/Drawer.tsx
icon={
<FaCog className="transition-transform group-hover:rotate-90" />
}
text={t("SETTINGS_BUTTON")}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cs4K1Sr4C tagging you here for visibility as you've been doing most of the i18n stuff. A default namespace can be added when using the useTranslationHook. Also in the future we can try and just do t("SETTINGS_BUTTON") instead of doing:

${t("SETTINGS_BUTTON", {
              ns: "drawer",
})}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all I want to remove in the next PR of i18n updates. I wanted to be sure at the beginning about the collecting of every translationable part should land on the correct file. It was easier to my eyes.

Comment thread src/utils/translations.ts
'errors' | 'drawer'


export const translate = (key: string, ns: Namespace | undefined) => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cs4K1Sr4C util func for using i18n next outside of the react context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, I made almost the same on local 😄

Comment thread src/server/api/routers/agentRouter.ts Outdated
Comment on lines +3 to +5
import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc";
import {prisma} from "../../db";
import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should have spaces between these braces

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just setup prettier so hopefully this is no longer an issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes the code more airy and more transparent with spaces. It depends on the code prettier settings I guess how it's formatting. If we discuss a fixation about the lookout of these braces then I can follow it in the future as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree on this one! Will likely be formatting the whole repo to fix this.

Comment thread src/components/Drawer.tsx
Comment on lines +269 to +270
? t("SIGN_OUT")
: t("SIGN_IN");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the drawer namespace here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set at the hook level above!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary...

Copy link
Copy Markdown
Contributor

@Cs4K1Sr4C Cs4K1Sr4C left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes are clear for me.

Comment thread src/utils/translations.ts
'errors' | 'drawer'


export const translate = (key: string, ns: Namespace | undefined) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, I made almost the same on local 😄

Comment thread src/components/Drawer.tsx
Comment on lines +269 to +270
? t("SIGN_OUT")
: t("SIGN_IN");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary...

Comment thread src/server/api/routers/agentRouter.ts Outdated
Comment on lines +3 to +5
import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc";
import {prisma} from "../../db";
import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes the code more airy and more transparent with spaces. It depends on the code prettier settings I guess how it's formatting. If we discuss a fixation about the lookout of these braces then I can follow it in the future as well.

type: MESSAGE_TYPE_SYSTEM,
value:
"👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }),
value: "👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take care all of these translations which have emoticons.

awtkns added 2 commits May 9, 2023 21:17
# Conflicts:
#	src/components/Input.tsx
#	src/components/TaskWindow.tsx
#	src/pages/index.tsx
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants