@evandu/super-pi 0.1.114 → 0.1.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/.super-pi-client-sources.json +3 -3
- package/dist/client/assets/{CodeMirrorEditor-moFTk5SE.js → CodeMirrorEditor-DNLm2zT6.js} +2 -2
- package/dist/client/assets/{dist-DQjJMys5.js → dist-2zLLUXCo.js} +1 -1
- package/dist/client/assets/{dist-BsO40qxQ.js → dist-4qEFEbMF.js} +1 -1
- package/dist/client/assets/{dist-DuWhzonJ.js → dist-BLldidtK.js} +1 -1
- package/dist/client/assets/{dist-DrbUrVWB.js → dist-BO4YrDmO.js} +1 -1
- package/dist/client/assets/{dist-DIfmMr8s.js → dist-BTsfS8CA.js} +1 -1
- package/dist/client/assets/{dist-Dnr5BxAi.js → dist-BVCGM9Bd.js} +1 -1
- package/dist/client/assets/{dist-BR4s0dNg.js → dist-B_N2ELl5.js} +1 -1
- package/dist/client/assets/{dist-TgNJUr7p.js → dist-BoV9nE13.js} +1 -1
- package/dist/client/assets/{dist-DPDGd2jl.js → dist-CEJcHfEn.js} +1 -1
- package/dist/client/assets/{dist-D9m04q-s.js → dist-CW83qn3P.js} +1 -1
- package/dist/client/assets/{dist-CCYnr6ul.js → dist-CezTi1ET.js} +1 -1
- package/dist/client/assets/{dist-BUuPRG15.js → dist-DszqHTui.js} +1 -1
- package/dist/client/assets/{dist-rhPxFuD1.js → dist-DuHJr7vQ.js} +1 -1
- package/dist/client/assets/{dist-Bds_PUYK.js → dist-JI_7suRx.js} +1 -1
- package/dist/client/assets/{dist-CL65aMXY.js → dist-pJBZJJnA.js} +1 -1
- package/dist/client/assets/{dist-DPvy57Ph.js → dist-zwqOqWyp.js} +1 -1
- package/dist/client/assets/{index-BixdV7aQ.js → index-CLoO6IHy.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/server/application/conversation-service.js +8 -0
- package/package.json +1 -1
package/dist/client/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="alternate icon" href="/favicon.ico" />
|
|
9
9
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
10
10
|
<title>Super Pi</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-CLoO6IHy.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-CGXMw9LP.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
@@ -100,6 +100,8 @@ export class ConversationService {
|
|
|
100
100
|
const conversation = state.conversations.find(item => item.id === conversationId);
|
|
101
101
|
if (!conversation)
|
|
102
102
|
throw new Error("会话不存在");
|
|
103
|
+
if (conversation.archivedAt)
|
|
104
|
+
throw new Error("已归档的会话无法重命名,请先恢复会话");
|
|
103
105
|
const workspace = state.workspaces.find(item => item.id === conversation.workspaceId);
|
|
104
106
|
if (!workspace)
|
|
105
107
|
throw new Error("会话所属的工作区不存在");
|
|
@@ -154,6 +156,9 @@ export class ConversationService {
|
|
|
154
156
|
* Renames a conversation.
|
|
155
157
|
*/
|
|
156
158
|
async renameConversation(conversationId, name) {
|
|
159
|
+
const conversation = this.store.snapshot().conversations.find((item) => item.id === conversationId);
|
|
160
|
+
if (conversation?.archivedAt)
|
|
161
|
+
throw new Error("已归档的会话无法重命名,请先恢复会话");
|
|
157
162
|
await this.store.renameConversation(conversationId, name);
|
|
158
163
|
this.broadcaster.broadcastState();
|
|
159
164
|
}
|
|
@@ -368,6 +373,9 @@ export class ConversationService {
|
|
|
368
373
|
if (!conversation) {
|
|
369
374
|
return { ok: false, message: "会话不存在" };
|
|
370
375
|
}
|
|
376
|
+
if (conversation.archivedAt) {
|
|
377
|
+
return { ok: false, message: "已归档的会话无法分叉,请先恢复会话" };
|
|
378
|
+
}
|
|
371
379
|
const workspace = snapshot.workspaces.find((item) => item.id === conversation.workspaceId);
|
|
372
380
|
if (!workspace) {
|
|
373
381
|
return { ok: false, message: `会话所属的工作区 ${conversation.workspaceId} 已不存在,拒绝分叉` };
|