Skip to content

Commit

Permalink
Merge pull request janhq#750 from janhq/copyfixing
Browse files Browse the repository at this point in the history
chore: fix app grammar
  • Loading branch information
freelerobot authored Nov 28, 2023
2 parents 9a52135 + 7199531 commit a990fa6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 22 deletions.
8 changes: 4 additions & 4 deletions web/hooks/useActiveModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useActiveModel() {
(activeModel && activeModel.id === modelId) ||
(stateModel.model === modelId && stateModel.loading)
) {
console.debug(`Model ${modelId} is already init. Ignore..`)
console.debug(`Model ${modelId} is already initialized. Ignore..`)
return
}

Expand Down Expand Up @@ -64,13 +64,13 @@ export function useActiveModel() {
}))
} else {
console.debug(
`Init model ${modelId} successfully!, take ${
`Model ${modelId} successfully initialized! Took ${
Date.now() - currentTime
}ms`
)
setActiveModel(model)
toaster({
title: 'Success start a Model',
title: 'Success!',
description: `Model ${modelId} has been started.`,
})
setStateModel(() => ({
Expand All @@ -89,7 +89,7 @@ export function useActiveModel() {
setActiveModel(undefined)
setStateModel({ state: 'start', loading: false, model: '' })
toaster({
title: 'Success stop a Model',
title: 'Success!',
description: `Model ${modelId} has been stopped.`,
})
}, 500)
Expand Down
2 changes: 1 addition & 1 deletion web/hooks/useSendChatMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function useSendChatMessage() {
const summaryMsg: ChatCompletionMessage = {
role: ChatCompletionRole.User,
content:
'summary this conversation in less than 5 words, the response should just include the summary',
'Summarize this conversation in less than 5 words, the response should just include the summary',
}
// Request convo summary
setTimeout(async () => {
Expand Down
9 changes: 3 additions & 6 deletions web/screens/Chat/ChatInstruction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ const ChatInstruction = () => {
}
return (
<div className="mx-auto mb-20 flex flex-col space-y-2">
<p>
What does this Assistant do? How does it behave? What should it avoid
doing?
</p>
<p>(Optional) Give your assistant an initial prompt.</p>
{!isSettingInstruction && activeConvoId && (
<>
<Button
themes={'outline'}
className="w-32"
onClick={() => setIsSettingInstruction(true)}
>
Give Instruction
Set a Prompt
</Button>
</>
)}
Expand All @@ -60,7 +57,7 @@ const ChatInstruction = () => {
className="w-32"
onClick={() => setSystemPrompt(instruction)}
>
Set Instruction
Set a Prompt
</Button>
</div>
)}
Expand Down
6 changes: 3 additions & 3 deletions web/screens/Chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ const ChatScreen = () => {
<div className="mx-auto mt-8 flex h-full w-3/4 flex-col items-center justify-center text-center">
{downloadedModels.length === 0 && (
<Fragment>
<h1 className="text-lg font-medium">{`Ups, you don't have a Model`}</h1>
<p className="mt-1">{`let’s download your first model.`}</p>
<h1 className="text-lg font-medium">{`Oops, you don't have a Model`}</h1>
<p className="mt-1">{`Let’s download your first model.`}</p>
<Button
className="mt-4"
onClick={() =>
Expand All @@ -212,7 +212,7 @@ const ChatScreen = () => {
{!activeModel && downloadedModels.length > 0 && (
<Fragment>
<h1 className="text-lg font-medium">{`You don’t have any actively running models`}</h1>
<p className="mt-1">{`Please start a downloaded model in My Models page to use this feature.`}</p>
<p className="mt-1">{`Please start a downloaded model to use this feature.`}</p>
<Badge className="mt-4" themes="outline">
<ShortCut menu="E" />
&nbsp; to show your model
Expand Down
6 changes: 3 additions & 3 deletions web/screens/MyModels/BlankState/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export default function BlankStateMyModel() {
<div className="text-center">
<DatabaseIcon size={32} className="mx-auto text-muted-foreground" />
<div className="mt-4">
<h1 className="text-xl font-bold leading-snug">{`Ups, You don't have a model.`}</h1>
<h1 className="text-xl font-bold leading-snug">{`Oops, you don't have a model yet.`}</h1>
<p className="mt-1 text-base">
{downloadStates.length > 0
? `Downloading model ... `
: `let’s download your first model`}
: `Let’s download your first model`}
</p>
{downloadStates?.length > 0 && (
<Modal>
<ModalTrigger asChild>
<Button themes="outline" className="mr-2 mt-6">
<span>{downloadStates.length} Downloading model</span>
<span>Downloading {downloadStates.length} model(s)</span>
</Button>
</ModalTrigger>
<ModalContent>
Expand Down
2 changes: 1 addition & 1 deletion web/screens/MyModels/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const MyModelsScreen = () => {
<div className="rounded-lg border border-border bg-background p-4 hover:border-primary/60">
<div className="flex h-full flex-col justify-between">
<div>
<h2 className="text-lg font-medium">Download more model?</h2>
<h2 className="text-lg font-medium">Download more models?</h2>
<p className="mt-2 leading-relaxed">
You have <span>{downloadedModels.length}</span> model(s)
downloaded.&nbsp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const PreferencePlugins = (props: Props) => {
}
toaster({
title: formatPluginsName(pluginName),
description: 'Success update preferences',
description: 'Successfully updated preferences',
})
}

Expand Down
6 changes: 3 additions & 3 deletions web/screens/Welcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const WelcomeScreen = () => {
>
Welcome to Jan
</h1>
<p className="mt-1">{`let’s download your first model`}</p>
<p className="mt-1">{`Let’s download your first model`}</p>
<Button
className="mt-4"
onClick={() => setMainViewState(MainViewState.ExploreModels)}
Expand All @@ -47,7 +47,7 @@ const WelcomeScreen = () => {
{downloadedModels.length >= 1 && !activeModel && (
<Fragment>
<h1 className="mt-2 text-lg font-medium">{`You don’t have any actively running models`}</h1>
<p className="mt-1">{`Please start a downloaded model in My Models page to use this feature.`}</p>
<p className="mt-1">{`Please start a downloaded model to use this feature.`}</p>
<Badge className="mt-4" themes="outline">
<ShortCut menu="E" />
&nbsp; to show your model
Expand All @@ -57,7 +57,7 @@ const WelcomeScreen = () => {
{downloadedModels.length >= 1 && activeModel && (
<Fragment>
<h1 className="mt-2 text-lg font-medium">{`Your Model is Active`}</h1>
<p className="mt-1">{`You are ready to start conversations.`}</p>
<p className="mt-1">{`You are ready to converse.`}</p>
<Button
className="mt-4"
onClick={() => setMainViewState(MainViewState.Chat)}
Expand Down

0 comments on commit a990fa6

Please sign in to comment.