granola-toolkit 0.34.2 → 0.34.4
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/cli.js +14 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1755,7 +1755,7 @@ var GranolaTuiWorkspace = class {
|
|
|
1755
1755
|
limit: 100
|
|
1756
1756
|
});
|
|
1757
1757
|
if (token !== this.#folderToken) return;
|
|
1758
|
-
this.#folders = result.folders;
|
|
1758
|
+
this.#folders = [...result.folders];
|
|
1759
1759
|
if (this.#selectedFolderId && !this.#folders.some((folder) => folder.id === this.#selectedFolderId)) this.#selectedFolderId = void 0;
|
|
1760
1760
|
this.#folderError = "";
|
|
1761
1761
|
} catch (error) {
|
|
@@ -1782,9 +1782,13 @@ var GranolaTuiWorkspace = class {
|
|
|
1782
1782
|
preferIndex: true
|
|
1783
1783
|
});
|
|
1784
1784
|
if (token !== this.#listToken) return;
|
|
1785
|
-
this.#meetings = result.meetings;
|
|
1785
|
+
this.#meetings = [...result.meetings];
|
|
1786
1786
|
this.#meetingSource = result.source;
|
|
1787
|
-
|
|
1787
|
+
let nextSelectedMeetingId;
|
|
1788
|
+
if (options.preferredMeetingId && this.#meetings.some((meeting) => meeting.id === options.preferredMeetingId)) nextSelectedMeetingId = options.preferredMeetingId;
|
|
1789
|
+
else if (this.#selectedMeetingId && this.#meetings.some((meeting) => meeting.id === this.#selectedMeetingId)) nextSelectedMeetingId = this.#selectedMeetingId;
|
|
1790
|
+
else nextSelectedMeetingId = this.#meetings[0]?.id;
|
|
1791
|
+
this.#selectedMeetingId = nextSelectedMeetingId;
|
|
1788
1792
|
if (!this.#selectedMeetingId) {
|
|
1789
1793
|
this.#selectedMeeting = void 0;
|
|
1790
1794
|
this.#detailError = "";
|
|
@@ -1863,14 +1867,15 @@ var GranolaTuiWorkspace = class {
|
|
|
1863
1867
|
this.#selectedMeeting = void 0;
|
|
1864
1868
|
this.#detailError = "";
|
|
1865
1869
|
this.#detailScroll = 0;
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
await this.loadMeeting(
|
|
1870
|
+
this.#selectedMeetingId = void 0;
|
|
1871
|
+
await this.loadMeetings({ setStatus: false });
|
|
1872
|
+
const visibleMeetingId = this.#selectedMeetingId && this.#meetings.some((meeting) => meeting.id === this.#selectedMeetingId) ? this.#selectedMeetingId : this.#meetings[0]?.id;
|
|
1873
|
+
if (visibleMeetingId) {
|
|
1874
|
+
this.#selectedMeetingId = visibleMeetingId;
|
|
1875
|
+
await this.loadMeeting(visibleMeetingId, { ensureMeetingVisible: true });
|
|
1872
1876
|
return;
|
|
1873
1877
|
}
|
|
1878
|
+
this.#selectedMeetingId = void 0;
|
|
1874
1879
|
this.tui.requestRender();
|
|
1875
1880
|
}
|
|
1876
1881
|
async moveSelection(delta) {
|