Skip to content

Commit 188ed5f

Browse files
committed
refactor: update names
1 parent 0fe0b92 commit 188ed5f

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

apps/api/orpc/routers/ai/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const chat = orpc
5959
{
6060
role: 'system',
6161
content: [
62-
`You are an SQL tool that generates valid SQL code for ${input.type} connection.`,
62+
`You are an SQL tool that generates valid SQL code for ${input.type} database.`,
6363
'You can use several tools to improve response.',
6464
'You can generate select queries using the tools to get data directly from the database.',
6565
'You can also search the web for information when the user asks about external resources, provides URLs, or needs current information beyond the database schema.',

apps/api/orpc/routers/connections/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const list = orpc
3131
}
3232
catch {
3333
throw new ORPCError('INTERNAL_SERVER_ERROR', {
34-
message: 'Failed to decrypt connection connection string',
34+
message: 'Failed to decrypt connection string',
3535
})
3636
}
3737
})

apps/desktop/src/entities/connection/components/connection-icon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { ComponentProps, JSX } from 'react'
1+
import type { ComponentProps, ReactNode } from 'react'
22
import { ConnectionType } from '@conar/shared/enums/connection-type'
33
import { createElement } from 'react'
44
import { ClickHouseIcon } from '~/icons/clickhouse'
55
import { MSSQLIcon } from '~/icons/mssql'
66
import { MySQLIcon } from '~/icons/mysql'
77
import { PostgresIcon } from '~/icons/postgres'
88

9-
const iconMap: Record<ConnectionType, (props: ComponentProps<'svg'>) => JSX.Element> = {
9+
const iconMap: Record<ConnectionType, (props: ComponentProps<'svg'>) => ReactNode> = {
1010
[ConnectionType.Postgres]: PostgresIcon,
1111
[ConnectionType.MySQL]: MySQLIcon,
1212
[ConnectionType.ClickHouse]: ClickHouseIcon,

apps/desktop/src/routes/_protected/create/-components/step-credentials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function StepCredentials({ ref, type, connectionString, setConnectionStri
2727
</Label>
2828
<Input
2929
id={id}
30-
placeholder={placeholderMap[type as ConnectionType]}
30+
placeholder={placeholderMap[type]}
3131
ref={ref}
3232
autoFocus
3333
value={connectionString}

apps/desktop/src/routes/_protected/database/$id.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ConnectionSidebar } from './-components/connection-sidebar'
1515
import { PasswordForm } from './-components/password-form'
1616

1717
export const Route = createFileRoute('/_protected/database/$id')({
18-
component: ConnectionPage,
18+
component: DatabasePage,
1919
beforeLoad: async ({ params }) => {
2020
const connection = connectionsCollection.get(params.id)
2121

@@ -35,14 +35,14 @@ export const Route = createFileRoute('/_protected/database/$id')({
3535
}),
3636
})
3737

38-
function getConnectionPageId(routesIds: (keyof FileRoutesById)[]) {
38+
function getDatabasePageId(routesIds: (keyof FileRoutesById)[]) {
3939
return routesIds.find(route => route.includes('/_protected/database/$id/')) as typeof connectionStoreType.infer['lastOpenedPage']
4040
}
4141

42-
function ConnectionPage() {
42+
function DatabasePage() {
4343
const { connection } = Route.useLoaderData()
4444
const currentPageId = useMatches({
45-
select: matches => getConnectionPageId(matches.map(match => match.routeId)),
45+
select: matches => getDatabasePageId(matches.map(match => match.routeId)),
4646
})
4747
const store = connectionStore(connection.id)
4848
const loggerOpened = useStore(store, state => state.loggerOpened)

0 commit comments

Comments
 (0)