Skip to content

gi-nx


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

NameType
activeProjectstring
activeWorkspacestring
auditMode"view" | "work" | "audit" | "embed"
hoststring
pathnamestring
queryParamsstring

Example

typescript
const context = await rpc.invoke("getUrlParams", []);
console.log("Current project:", context.activeProject);
console.log("Mode:", context.auditMode); // 'work', 'audit', 'embed', or 'view'