- Add drag-to-resize sidebar with localStorage persistence - Rewrite issue detail page with Tiptap rich text editor, due date picker, acceptance criteria - Redesign create-issue modal with pill-based property toolbar and expand/collapse - Consolidate @multica/sdk and @multica/types into apps/web/shared/ - Simplify auth: remove verification codes, PATs, email service (dev-only login) - Add 401 unauthorized handler to redirect expired sessions to login - Fix due date format to send full RFC3339 timestamps - Increase description editor debounce to 1500ms - Remove arbitrary Tailwind values in create-issue modal - Renumber migrations (inbox_actor 012→009), remove unused migrations - UI polish across agents, settings, inbox, knowledge-base pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
670 B
TypeScript
22 lines
670 B
TypeScript
import { createLogger } from "@/shared/logger";
|
|
import { ApiClient } from "./client";
|
|
|
|
export { ApiClient } from "./client";
|
|
export type { LoginResponse } from "./client";
|
|
export { WSClient } from "./ws-client";
|
|
|
|
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8080";
|
|
|
|
export const api = new ApiClient(API_BASE_URL, { logger: createLogger("api") });
|
|
|
|
// Initialize token from localStorage on load
|
|
if (typeof window !== "undefined") {
|
|
const token = localStorage.getItem("multica_token");
|
|
if (token) {
|
|
api.setToken(token);
|
|
}
|
|
const wsId = localStorage.getItem("multica_workspace_id");
|
|
if (wsId) {
|
|
api.setWorkspaceId(wsId);
|
|
}
|
|
}
|