199 Commits

Author SHA1 Message Date
473abb857c fix: the change assistant didn't take effect immediately #45 (#46)
* fix the change assistant didn't take effect immediately #45

* Update src/store/conversation.ts

Co-authored-by: boojack <stevenlgtm@gmail.com>

* change method name

* change method name

* fix the call method

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-04-20 21:08:00 +08:00
c28c18b77a feat: update Spanish Translation (#47)
* 🎨 style(es.json): add new keys and values for connection and assistant
🚀 chore(es.json): add new banner messages
The connection object now has new keys and values for the database type, title, host, port, database name, username, and password. The assistant object now has a new key and value for creating a new bot. The banner object now has two new messages, one for warning non-select SQL statements and another for promoting the product launch on Product Hunt.

* 🎨 style(es.json): fix typo in banner.product-hunt message
The message in banner.product-hunt contained a typo. The word "de" was removed to make the message grammatically correct.
2023-04-20 20:54:22 +08:00
ae8dc10768 chore: show product hunt banner 2023-04-20 15:08:21 +08:00
c1e5957038 chore: use copy-to-clipboard (#43) 2023-04-20 10:40:48 +08:00
4abe81f351 chore: add type field to TextField 2023-04-20 03:59:29 +08:00
86f1171c34 chore: hide product hunt buttons 2023-04-19 15:29:18 +08:00
781c7a643e chore: update product hunt link 2023-04-19 15:02:01 +08:00
84616c2b3f chore: show product hunt banner (#39)
* chore: show product hunt banner

* chore: add product hunt icon
2023-04-19 14:59:20 +08:00
ea2f0447eb chore: update message view padding in mobile 2023-04-19 14:39:09 +08:00
a290670e09 feat: add Thai locale 2023-04-19 11:32:47 +08:00
d7fe08f865 feat: add 繁體中文 locale 2023-04-19 11:28:50 +08:00
9c89bb894c chore: remove locale switch 2023-04-19 11:28:34 +08:00
29ee106e81 feat: add Deutsch locale (#38) 2023-04-19 11:23:54 +08:00
d1bc7dffff feat: support 日本語 locale 2023-04-19 11:12:51 +08:00
609f6c3dec docs: update readme (#37)
* docs: update readme with `deploy with docker`

* chore: add common questions section
2023-04-19 10:45:11 +08:00
8ee07db655 chore: update i18n of creating connection 2023-04-19 10:30:18 +08:00
a3ff1e8028 chore: add product hunt banner 2023-04-18 23:36:42 +08:00
c06b137d1d chore: add beta badge 2023-04-18 23:26:04 +08:00
f461293fef chore: update sample database 2023-04-18 17:41:20 +08:00
5b2b713ec9 chore: hide migration bot 2023-04-18 17:18:11 +08:00
8d9df96688 chore: add build release image action 2023-04-18 16:45:29 +08:00
66320c892d feat: add connection title field 2023-04-18 11:27:27 +08:00
911c801f04 chore: add bot template 2023-04-18 11:20:54 +08:00
480ec2d463 chore: declare bots id 2023-04-18 10:16:11 +08:00
0bf7a155b1 chore: change slogan 2023-04-18 00:43:14 +08:00
cf8d9add08 chore: check in vscode setting 2023-04-18 00:41:48 +08:00
7b4482025a chore: update create assistant link 2023-04-18 00:27:27 +08:00
74ebcd0799 fix: update default assistant for connection 2023-04-18 00:06:50 +08:00
2c7d816e1a feat: allow update conversation bot in UI 2023-04-17 17:33:20 +08:00
4a0d652412 fix: default bot id 2023-04-17 17:21:01 +08:00
d03ce9fac1 feat: implement general assistant 2023-04-17 16:14:39 +08:00
13b23181b0 fix: remove affectedRows for select statement in pg 2023-04-17 15:40:42 +08:00
802413fddd feat: add actions dropdown to user message 2023-04-14 17:28:04 +08:00
355c97f14e chore: update execute button style 2023-04-14 16:50:59 +08:00
9a47f87550 chore: update select style 2023-04-14 16:39:57 +08:00
14f86897d6 feat: support run non-select SQL (#35) 2023-04-14 15:54:22 +08:00
70b37211cd chore: move encrypt to connection (#34) 2023-04-14 14:28:49 +08:00
f9bd62caa0 feat: support for MSSQL database (#33)
* * 📦 chore(package.json): add mssql package
The mssql package has been added to the dependencies list in package.json. This package is required for connecting to Microsoft SQL Server databases.

* *  feat(README.md): add support for MSSQL database
*  feat(CreateConnectionModal.tsx): add support for MSSQL engine type
*  feat(EngineIcon.tsx): add support for MSSQL engine type icon
*  feat(connectors/index.ts): add support for MSSQL engine type connector
MSSQL database is now supported by the application. The CreateConnectionModal component now has an option to select MSSQL as the engine type. The EngineIcon component now has an icon for MSSQL engine type. The connectors/index.ts file now has a connector for MSSQL engine type. The README.md file has been updated to reflect the addition of MSSQL support.

* 🎉 feat(mssql): add support for Microsoft SQL Server
This commit adds a new connector for Microsoft SQL Server. The connector supports the following features:
- Test connection
- Execute statement
- Get databases
- Get tables
- Get table structure

The connector uses the mssql package to connect to the database. The connector is created using a factory function that takes a Connection object as an argument and returns a Connector object.

*  feat(connection.ts): add MSSQL engine and SSL options
The MSSQL engine has been added to the list of supported engines. Additionally, SSL options have been added to the Connection interface, including the ability to enable SSL and trust the server certificate.

* * 🐛 fix(mssql/index.ts): add USE statement to query
The execute and getTableStructure functions were not properly using the specified databaseName. The fix adds a USE statement to the query to ensure that the correct database is used.

* * 🐛 fix(mssql/index.ts): change getTableStructure function to use ConnectionPool instead of Connection
*  feat(mssql/index.ts): improve getTableStructure function to return standard schema string
The getTableStructure function now uses ConnectionPool instead of Connection, which is more efficient. The function has also been improved to return a standard schema string instead of the raw output from sp_help. The schema string is generated by querying the INFORMATION_SCHEMA.COLUMNS table and transforming the results into a standard schema string. This improves the consistency of the schema strings and makes them easier to work with.

* * 🚀 feat(CreateConnectionModal.tsx): add support for SSL encryption for MSSQL connections
* 🐛 fix(mssql/index.ts): fix encrypt option for MSSQL connections
The CreateConnectionModal component now supports SSL encryption for MSSQL connections. A new checkbox has been added to the modal to allow users to enable or disable SSL encryption. The mssql/index.ts file has been updated to fix the encrypt option for MSSQL connections. The encrypt option now uses the `encrypt` property of the `ssl` object instead of the `enabled` property.

* 🐛 fix(connection.ts): rename SSL options properties
The `enabled` and `trustServerCertificate` properties of the `SSLOptions` interface have been renamed to `encrypt` to better reflect their purpose.
2023-04-14 14:19:51 +08:00
80e4d7c353 chore: update code block component 2023-04-14 14:09:32 +08:00
790e418eec chore: update select kit component 2023-04-14 12:17:10 +08:00
a0003dc571 chore: update dev-ci action 2023-04-14 11:47:20 +08:00
ca23d78c8b feat: add Dockerfile (#32)
* feat: add Dockerfile

* chore: add build dev image action
2023-04-14 10:45:21 +08:00
cca6cbcad6 feat: add Spanish Language (#31)
* * 🐳 chore(Dockerfile): add Dockerfile for sqlchat
This commit adds a Dockerfile for sqlchat. The Dockerfile is based on Alpine Linux version 3.17 and installs the necessary dependencies for the application to run. The Dockerfile also sets the metadata for the container and copies the application files into the container. The Dockerfile uses pnpm to install the application dependencies and sets the OPENAI_API_KEY and OPENAI_API_ENDPOINT arguments for the container. The CMD instruction specifies the command to run when the container starts, which is to run the application in development mode using pnpm.

* * 🌐 feat(LocaleSelector.tsx): add support for Spanish language
* 🌐 feat(LocaleSwitch.tsx): add support for switching to Spanish language
* 🎨 style(ThemeSwitch.tsx): refactor button JSX for readability
The LocaleSelector component now includes an option for Spanish language. The LocaleSwitch component now includes support for switching to Spanish language. The ThemeSwitch component has been refactored to improve readability of the button JSX.

* 🌐 feat(i18n.ts): add support for Spanish language
A new language, Spanish, has been added to the application. The translations for the new language have been added to the es.json file. The i18n configuration has been updated to include the new language.

*  feat(setting.ts): add support for Spanish language
The Locale type now includes "es" for Spanish language support.

* * 🗑️ chore(Dockerfile): remove Dockerfile
The Dockerfile has been removed from the repository.

* * 🐛 fix(LocaleSwitch.tsx): fix indentation and add missing semicolon
* 🐛 fix(ThemeSwitch.tsx): remove unnecessary code and fix indentation
The LocaleSwitch component had an indentation issue and a missing semicolon. The ThemeSwitch component had unnecessary code that was removed, and the indentation was fixed.
2023-04-14 09:00:10 +08:00
d43fefc7f3 feat: implement Dropdown kit component 2023-04-14 08:10:25 +08:00
81ad3408fb fix: edit connection state 2023-04-13 22:58:09 +08:00
2ad7ede9fe chore: update modal props 2023-04-13 22:40:17 +08:00
6bec306c47 chore: remove tauri deps 2023-04-13 22:11:28 +08:00
e14b69cf4c chore: update modal kit component 2023-04-13 15:15:03 +08:00
68d2d8e7d1 chore: update github star badge dark mode 2023-04-13 14:39:55 +08:00
bb938f36c7 fix: remove code block external slashs 2023-04-13 14:13:32 +08:00