Skip to content

Commit 532ea40

Browse files
authored
parse the url to get charm/space info ... :( (#1031)
1 parent 67bf3cc commit 532ea40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jumble/src/iframe-ctx.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,13 @@ export const setupIframe = () =>
248248
"groq:llama-3.3-70b-versatile",
249249
];
250250
}
251+
// FIXME(ja): how can we get this from the system not the url?
252+
const parts = globalThis.location.pathname.split("/");
251253
jsonPayload.metadata = {
252254
...jsonPayload.metadata,
253255
context: "iframe",
256+
spaceName: parts[1] ?? "fixme",
257+
charmId: parts[2] ?? "fixme",
254258
};
255259

256260
const res = await llm.sendRequest(jsonPayload);

0 commit comments

Comments
 (0)