agent-loft 0.2.87 → 0.2.88
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/package.json +1 -1
- package/web/views/layout.js +2 -2
- package/web/views/messages.js +2 -2
package/package.json
CHANGED
package/web/views/layout.js
CHANGED
|
@@ -165,8 +165,8 @@ export async function boot() {
|
|
|
165
165
|
else void loadQuota();
|
|
166
166
|
if (srv && srv !== HOME) routeToServer(srv, decodeURIComponent(landing.hash.slice(1)));
|
|
167
167
|
const fromHash = decodeURIComponent(location.hash.slice(1));
|
|
168
|
-
//
|
|
169
|
-
const latest = latestConversation();
|
|
168
|
+
// 地址里带了会话就打开它;否则打开最近活跃的 Web 对话,没有才进新对话页
|
|
169
|
+
const latest = latestConversation("web");
|
|
170
170
|
if (fromHash === "tasks") openTasksView();
|
|
171
171
|
else if (fromHash === "library") openLibraryView();
|
|
172
172
|
else if (fromHash === "new") newDraft({ inheritLatest: true });
|
package/web/views/messages.js
CHANGED
|
@@ -63,8 +63,8 @@ function leaveTasksView() {
|
|
|
63
63
|
document.dispatchEvent(new Event("aim:leave-view"));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export function latestConversation() {
|
|
67
|
-
return [...S.convs.values()].filter((c) => !c.hidden).sort((a, b) => b.activeAt - a.activeAt)[0];
|
|
66
|
+
export function latestConversation(channel) {
|
|
67
|
+
return [...S.convs.values()].filter((c) => !c.hidden && (!channel || c.channel === channel)).sort((a, b) => b.activeAt - a.activeAt)[0];
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export function newDraft({ inheritLatest = false } = {}) {
|