gi-nx / getUrlParams
ts
function getUrlParams(): {
activeProject: string;
activeWorkspace: string;
auditMode: "view" | "work" | "audit" | "embed";
host: string;
pathname: string;
queryParams: string;
};Get the current page URL and Giraffe routing context. Returns the active workspace, project, and mode along with URL details.
Returns
| Name | Type |
|---|---|
activeProject | string |
activeWorkspace | string |
auditMode | "view" | "work" | "audit" | "embed" |
host | string |
pathname | string |
queryParams | string |
Example
typescript
const context = await rpc.invoke("getUrlParams", []);
console.log("Current project:", context.activeProject);
console.log("Mode:", context.auditMode); // 'work', 'audit', 'embed', or 'view'