Update prompts:
When sending a message to openai, we actually send two messages.
There are two issues here:
1. the role in the first message shall be user or system
2. the content in the first message is not being interpolated at all.
```
[
{
role: "assistant",
createdAt: "2024-04-27T06:30:34.820Z",
params: {
language: "French",
},
content: "You are a translation expert, please translate the following content into French, and only perform the translation action, keeping the translated content in the same format as the original content:\n\n \"\"\"\"\n\n \n\n \"\"\"\"",
},
{
role: "user",
content: "Basic things you should know:",
attachments: undefined,
params: {
language: "French",
},
createdAt: "2024-04-29T09:42:11.466Z",
},
]
```
In this PR I removed `content` from prompts and let open ai use the second message (user) as the input.
Previously, we marked `jumpOnce: true` on `doc.meta` to open a specific doc after creating a new workspace. This pr removes `jumpOnce` and directly jumps to the specific doc URL.
This PR also fixes an error when opening the all-page page, because the all-page page scans the jumpOnce attribute of all docs, and the code in it will fail on damaged data.
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.10 to 0.21.11.
<details>
<summary>Commits</summary>
<ul>
<li><a href="7b8d1dbc1e"><code>7b8d1db</code></a> Prepare 0.21.11</li>
<li><a href="ebcb4782f2"><code>ebcb478</code></a> complete_io: bail out if progress is impossible</li>
<li><a href="20f35dfb6d"><code>20f35df</code></a> Regression test for <code>complete_io</code> infinite loop bug</li>
<li><a href="2f2aae15a4"><code>2f2aae1</code></a> Don't specially handle unauthenticated close_notify alerts</li>
<li><a href="e163587b98"><code>e163587</code></a> Don't deny warnings from nightly clippy</li>
<li><a href="9f864874cf"><code>9f86487</code></a> server::handy: fix new nightly clippy lint</li>
<li><a href="7e0e8ab599"><code>7e0e8ab</code></a> Correct assorted clippy warnings in test code</li>
<li><a href="3587d98f4e"><code>3587d98</code></a> Apply clippy suggestions from Rust 1.72</li>
<li><a href="d082e837b3"><code>d082e83</code></a> Address <code>clippy::redundant_static_lifetimes</code></li>
<li><a href="5e7a06ca45"><code>5e7a06c</code></a> Address <code>clippy::slow_vector_initialization</code></li>
<li>Additional commits viewable in <a href="https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustls&package-manager=cargo&previous-version=0.21.10&new-version=0.21.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/toeverything/AFFiNE/network/alerts).
</details>