Skip to content

Commit cdedb9d

Browse files
committed
lite: get llm @mention to work
1 parent fbc478c commit cdedb9d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/packages/frontend/editors/markdown-input/mentionable-users.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
import { cmp, timestamp_cmp, trunc_middle } from "@cocalc/util/misc";
4242
import { CustomLLMPublic } from "@cocalc/util/types/llm";
4343
import { Item as CompleteItem } from "./complete";
44+
import { lite } from "@cocalc/frontend/lite";
4445

4546
// we make the show_llm_main_menu field required, to avoid forgetting to set it ;-)
4647
type Item = CompleteItem & Required<Pick<CompleteItem, "show_llm_main_menu">>;
@@ -114,16 +115,14 @@ function mentionableUsers({
114115
.getStore("projects")
115116
.getIn(["project_map", project_id, "last_active"]);
116117

117-
if (users == null || last_active == null) return []; // e.g., for an admin
118-
119118
const my_account_id = redux.getStore("account").get("account_id");
120119

121120
function getProjectUsers() {
122121
const project_users: {
123122
account_id: string;
124123
last_active: Date | undefined;
125124
}[] = [];
126-
for (const [account_id] of users) {
125+
for (const [account_id] of users ?? []) {
127126
project_users.push({
128127
account_id,
129128
last_active: last_active.get(account_id),

0 commit comments

Comments
 (0)