heyiam 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/llm/index.js CHANGED
@@ -1,24 +1,15 @@
1
1
  import { AnthropicProvider } from './anthropic-provider.js';
2
- import { ProxyProvider } from './proxy-provider.js';
3
2
  import { getAnthropicApiKey } from '../settings.js';
4
- export { ProxyError } from './proxy-provider.js';
5
3
  /**
6
- * Returns the appropriate LLM provider based on environment.
7
- *
8
- * Resolution priority:
9
- * 1. If ANTHROPIC_API_KEY env var is set → AnthropicProvider (BYOK)
10
- * 2. If API key saved in ~/.config/heyiam/settings.json → AnthropicProvider (BYOK)
11
- * 3. Otherwise → ProxyProvider (server-side, requires auth)
4
+ * Returns the Anthropic LLM provider.
5
+ * Requires ANTHROPIC_API_KEY (env var or saved in settings).
12
6
  */
13
7
  export function getProvider() {
14
- if (getAnthropicApiKey()) {
15
- return new AnthropicProvider();
16
- }
17
- return new ProxyProvider();
8
+ return new AnthropicProvider();
18
9
  }
19
10
  /**
20
- * Returns the current enhancement mode for display purposes.
11
+ * Returns whether AI enhancement is available.
21
12
  */
22
- export function getEnhanceMode() {
23
- return getAnthropicApiKey() ? 'local' : 'proxy';
13
+ export function hasApiKey() {
14
+ return !!getAnthropicApiKey();
24
15
  }
package/dist/mount.js CHANGED
@@ -23069,12 +23069,19 @@
23069
23069
  const [active, setActive] = (0, import_react3.useState)(null);
23070
23070
  showOverlay = (session) => setActive(session);
23071
23071
  if (!active) return null;
23072
- const projectEl = document.querySelector("[data-session-base-url]");
23072
+ const projectEl = document.querySelector(".heyiam-project");
23073
23073
  const baseUrl = projectEl?.getAttribute("data-session-base-url");
23074
23074
  let sessionPageUrl;
23075
23075
  if (baseUrl) {
23076
23076
  const slug = active.title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 80) || "untitled";
23077
23077
  sessionPageUrl = `${baseUrl}/${slug}.html`;
23078
+ } else {
23079
+ const username = projectEl?.getAttribute("data-username");
23080
+ const projectSlug = projectEl?.getAttribute("data-project-slug");
23081
+ const sessionSlug = active.slug;
23082
+ if (username && projectSlug && sessionSlug) {
23083
+ sessionPageUrl = `/@${username}/${projectSlug}/${sessionSlug}`;
23084
+ }
23078
23085
  }
23079
23086
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
23080
23087
  SessionOverlay,