Commit Graph

72 Commits

Author SHA1 Message Date
Enrico Ros b5b709b3cd Wide Mode support 2023-03-29 03:14:58 -07:00
Enrico Ros 43a13fffe2 Fix again the V-layout of the Area 2023-03-29 03:14:29 -07:00
Enrico Ros 0e49514f03 Fix parsing of C++ code blocks 2023-03-29 03:12:10 -07:00
Enrico Ros 4af44fbff2 Broader NoSSR: too much is customized from localStorage
Also fix the layout of the APP. More stable now.
2023-03-29 02:24:06 -07:00
Enrico Ros 385ea77f93 Update Model/Purpose from the title bar
Remove it from Settings too
2023-03-29 01:51:25 -07:00
Enrico Ros 24a0213397 Move systemPurposeId/chatModelId per-chat 2023-03-28 23:32:23 -07:00
Enrico Ros df512f57b1 ChatStore: persisted multi-conversation store 2023-03-28 05:20:18 -07:00
Enrico Ros 1edcb02c0d Testing quick fix for #28 2023-03-28 02:50:40 -07:00
Enrico Ros 2332fdde71 Conversations State
Lay down the foundation for switchable chats
that are automatically persisted
2023-03-28 02:48:28 -07:00
Enrico Ros 9fd9db5d7a Pedantic 2023-03-27 22:26:42 -07:00
Enrico Ros d532fb6da2 Comments 2023-03-27 03:40:05 -07:00
Enrico Ros e71f08f629 Extract the Conversation (message list) ChatArea
In the future, more actions will be performed on the
state, so the ownership of message and messaging
actions can be brought back to the conversation, from
the (currently) ChatArea
2023-03-27 03:24:26 -07:00
Enrico Ros 9c126086b4 Index to ChatArea 2023-03-27 02:36:40 -07:00
Enrico Ros 3a69ca0b5c Improve Composer Encapsulation 2023-03-27 02:25:30 -07:00
Enrico Ros 25f4d7ed04 Extract ApplicationBar 2023-03-27 01:51:35 -07:00
Enrico Ros 90b267a93b Config cleanup 2023-03-27 01:07:51 -07:00
Enrico Ros ed7333a2c8 Rename SettingsModal 2023-03-26 23:01:12 -07:00
Enrico Ros 5c6e1e9c8d Moving forward we'll use /lib 2023-03-26 22:58:59 -07:00
Enrico Ros 6b96046d40 Cleanups in preparation for Editability & Multi-chats 2023-03-26 04:44:53 -07:00
Enrico Ros 5008f111a7 Merged #22. Stop button in the UI
The UI side works well, including aborting the network
request to the api, and showing status and issues.
The API function (api/chat.ts) doesn't seem to work yet,
as the try/catch blocks are not triggered (both on the
'handler', and in the 'OpenAIStream').
In the meantime, having the Stop button on the UI is still
a net gain, despite tokens still running/being used from
the API call.
2023-03-26 04:25:23 -07:00
Enrico Ros 1b340deb31 Cleanup types 2023-03-26 02:22:03 -07:00
Enrico Ros 8233348a76 Earlier screenshot 2023-03-25 19:55:47 -07:00
Enrico Ros f16e744ef9 Smaller moves 2023-03-24 19:06:36 -07:00
Enrico Ros 4ef48f0923 Lints 2023-03-24 18:22:13 -07:00
Enrico Ros ccb5456e28 Small fix 2023-03-24 17:57:53 -07:00
Enrico Ros b308bf418c Disable Vercel analytics debug 2023-03-24 17:01:30 -07:00
Enrico Ros ce24209f73 Enable Vercel deployments to have analytics 2023-03-24 16:55:05 -07:00
Enrico Ros 4fbb884eba Roll packages 2023-03-24 16:51:17 -07:00
Enrico Ros 2ea2de601a Cleanups 2023-03-24 03:31:43 -07:00
Enrico Ros ecdcdef749 Error message for Context size 2023-03-24 03:10:51 -07:00
Enrico Ros 89b77b2408 Move all State and Defaults in the store 2023-03-24 02:45:32 -07:00
Enrico Ros 798e9e878f Migrate the API Key into the state store 2023-03-24 02:15:45 -07:00
Enrico Ros 0d915f0eb7 Red bar during development 2023-03-24 01:51:57 -07:00
Enrico Ros a63c9123dd Improve the Api (/api/chat) payload 2023-03-24 01:39:51 -07:00
Enrico Ros 65b8aab53e Markdown: syntax highlight in code blocks
Implements part of #11, where the markdown is in code blocks of this type:
```SomeName.md
# ...
```
2023-03-24 00:39:33 -07:00
Enrico Ros f2bb334778 Markdown: syntax highlight in code blocks
Implements part of #11, where the markdown is in code blocks of this type:
```markdown
# ...
```
2023-03-24 00:26:45 -07:00
Enrico Ros db2df648a9 Merge pull request #20 from seven4x/main
Fix: WARN  Issues with peer dependencies found
2023-03-23 23:46:26 -07:00
Enrico Ros 2dafafdcf4 Improve running code. Can render basic HTML.
Fixes #19. Now it's showing the HTML in the Sandpack box.
2023-03-23 23:33:52 -07:00
Enrico Ros c15b48d1b4 Fix #24: when OPENAI_API_KEY is defined, do not prompt the user
With this simple change, if the key is defined _at build time_,
the user will not be prompted to enter a key, and it will be
marked as 'not required' in the Settings dialog.

Note that this verifies a build-time key (next build), not that
the same key is set at runtime (next start).

The behavior of the UI is just altered slightly, but enough to
show that the key is not required when set on the server.
2023-03-23 22:45:47 -07:00
Lei Zhang 527f3ca5e1 overrides @mui/material for pnpm 2023-03-23 16:56:54 +08:00
Fred Liu 0ca13e67e6 Stop Generation button initial implementation. 2023-03-23 00:44:17 -07:00
Lei Zhang c77d1c56e7 Fix: WARN  Issues with peer dependencies found
Fix: WARN  Issues with peer dependencies found

.
├─┬ @mui/icons-material 5.11.11
│ └── ✕ missing peer @mui/material@^5.0.0
└─┬ @codesandbox/sandpack-react 2.1.11
  └─┬ ansi-to-react 6.1.6
    ├── ✕ unmet peer react@"^16.3.2 || ^17.0.0": found 18.2.0
    └── ✕ unmet peer react-dom@"^16.3.2 || ^17.0.0": found 18.2.0
Peer dependencies that should be installed:
  @mui/material@^5.0.0
2023-03-22 22:40:24 +08:00
Enrico Ros 4babee363a Migrated the history state 2023-03-22 01:20:17 -07:00
Enrico Ros 3e6bbd8fe8 Persisted State Store - enables better UX
Basic implementation using Zustand to store values. For now just the
ChatModel and the SystemPurpose that are currently active. This enables
app-wide synchronization and automated persistence. Meaning we can now
have settings (and in future conversations) which are persisted and
synchronized.

API keys have not been migrated yet, because we need to import them from
the existing localStorage key, for a smooth transition.
2023-03-22 00:29:51 -07:00
Enrico Ros 49bc3192ec Explain model/system errors to the users
Closes #18 and closes #16. Interesting find: the "code":"model_not_found" shows
that the model is just not authorized for this API key. If the model is really
non-existing and can't be found, the error code will be "null", and the message
will be "The model 'XYZ' does not exist".
2023-03-21 22:52:57 -07:00
Enrico Ros 5425ed3ca4 Update README.md 2023-03-20 21:27:01 -07:00
Enrico Ros 5cfcd7931e React hook for Speech Recognition
Adapt speech recognition to begin as 'false' and dynamically update state.
UX: the button can now be dynamic (no hydration issues). Differentiated
mobile vs desktop look.

I need to use the 'useCallback' function to pass the onResult callback,
otherwise the code loops (as the callback function will get recreated
every time, and it's circular).
2023-03-20 21:04:26 -07:00
Enrico Ros 5e9d7fecdf Merge branch 'koganei-feat/speech-recog' 2023-03-20 19:39:24 -07:00
Marc Khoury 1a052b3b64 Basic Voice Input 2023-03-20 20:59:40 -04:00
Marc Khoury 02214f7382 Merge pull request #1 from enricoros/main
Merge back
2023-03-20 06:46:47 -04:00