@heyo-sh/create-heyo-docs 0.4.0 → 1.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyo-sh/create-heyo-docs",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Create a standalone Heyo Docs documentation project.",
5
5
  "homepage": "https://heyo.sh",
6
6
  "repository": {
@@ -66,16 +66,17 @@ sidebar entry should point to a page outside the local documentation.
66
66
 
67
67
  ## AI chat
68
68
 
69
- Add `ai.chat` to enable a documentation-aware chat. `openai`, `claude`, and `grok`
70
- use the OpenAI, Anthropic, and xAI adapters respectively. Keep the key in a
71
- server environment variable; Heyo Docs sends it only from the chat endpoint.
69
+ Add `ai.chat` to enable a documentation-aware chat through [Pi](https://github.com/badlogic/pi-mono).
70
+ Use any provider identifier bundled with the installed Pi version, such as
71
+ `openai`, `anthropic`, `google`, `openrouter`, or `xai`. Authentication stays
72
+ server-only and is selected explicitly for the provider.
72
73
 
73
74
  <CodeBlock language="ts" title="heyo-docs.config.ts">
74
75
  {`ai: {
75
76
  chat: {
76
77
  provider: "openai",
77
- key: process.env.OPENAI_API_KEY!,
78
78
  model: "gpt-5-mini",
79
+ auth: { type: "api-key", token: process.env.OPENAI_API_KEY! },
79
80
  variant: "right", // "center" shows the compact prompt first
80
81
  icon: "chat",
81
82
  text: "AI Chat",
@@ -85,8 +86,14 @@ server environment variable; Heyo Docs sends it only from the chat endpoint.
85
86
  },`}
86
87
  </CodeBlock>
87
88
 
88
- `provider`, `key`, and `model` are required. The model must be an actual model
89
- identifier, not the provider name. `variant` defaults to `right`. `name`
89
+ `provider`, `model`, and `auth` are required. API-key providers use
90
+ `{ type: "api-key", token }`. GitHub Copilot and OpenAI Codex use
91
+ `{ type: "oauth", getAccessToken }`; the resolver runs before each Pi request,
92
+ so it can refresh a short-lived token. Amazon Bedrock uses either
93
+ `{ type: "aws", region?, profile? }` and the AWS credential chain, or
94
+ `{ type: "bedrock-bearer", token, region? }`. The model must be an actual model
95
+ identifier, not the provider name. Amazon Bedrock requires a Node.js chat
96
+ endpoint. `variant` defaults to `right`. `name`
90
97
  defaults to `AI`; it is used for the drawer title and the assistant's message
91
98
  label. `placeholder` defaults to
92
99
  `Ask AI about the docs` and is shared by the compact prompt and drawer input.
@@ -66,16 +66,17 @@ sidebar entry should point to a page outside the local documentation.
66
66
 
67
67
  ## AI chat
68
68
 
69
- Add `ai.chat` to enable a documentation-aware chat. `openai`, `claude`, and `grok`
70
- use the OpenAI, Anthropic, and xAI adapters respectively. Keep the key in a
71
- server environment variable; Heyo Docs sends it only from the chat endpoint.
69
+ Add `ai.chat` to enable a documentation-aware chat through [Pi](https://github.com/badlogic/pi-mono).
70
+ Use any provider identifier bundled with the installed Pi version, such as
71
+ `openai`, `anthropic`, `google`, `openrouter`, or `xai`. Authentication stays
72
+ server-only and is selected explicitly for the provider.
72
73
 
73
74
  <CodeBlock language="ts" title="heyo-docs.config.ts">
74
75
  {`ai: {
75
76
  chat: {
76
77
  provider: "openai",
77
- key: process.env.OPENAI_API_KEY!,
78
78
  model: "gpt-5-mini",
79
+ auth: { type: "api-key", token: process.env.OPENAI_API_KEY! },
79
80
  variant: "right", // "center" shows the compact prompt first
80
81
  icon: "chat",
81
82
  text: "AI Chat",
@@ -85,8 +86,14 @@ server environment variable; Heyo Docs sends it only from the chat endpoint.
85
86
  },`}
86
87
  </CodeBlock>
87
88
 
88
- `provider`, `key`, and `model` are required. The model must be an actual model
89
- identifier, not the provider name. `variant` defaults to `right`. `name`
89
+ `provider`, `model`, and `auth` are required. API-key providers use
90
+ `{ type: "api-key", token }`. GitHub Copilot and OpenAI Codex use
91
+ `{ type: "oauth", getAccessToken }`; the resolver runs before each Pi request,
92
+ so it can refresh a short-lived token. Amazon Bedrock uses either
93
+ `{ type: "aws", region?, profile? }` and the AWS credential chain, or
94
+ `{ type: "bedrock-bearer", token, region? }`. The model must be an actual model
95
+ identifier, not the provider name. Amazon Bedrock requires a Node.js chat
96
+ endpoint. `variant` defaults to `right`. `name`
90
97
  defaults to `AI`; it is used for the drawer title and the assistant's message
91
98
  label. `placeholder` defaults to
92
99
  `Ask AI about the docs` and is shared by the compact prompt and drawer input.
@@ -1,4 +1,3 @@
1
- import { createAiChatResponse } from "@heyo-sh/heyo-docs/ai";
2
1
  import type { ActionFunctionArgs } from "react-router";
3
2
 
4
3
  import config from "../../heyo-docs.config";
@@ -12,6 +11,7 @@ export async function action({ request }: ActionFunctionArgs) {
12
11
  status: 405,
13
12
  });
14
13
 
14
+ const { createAiChatResponse } = await import("@heyo-sh/heyo-docs/ai");
15
15
  return createAiChatResponse(request, {
16
16
  ai: config.ai,
17
17
  markdownPages,
@@ -66,16 +66,17 @@ sidebar entry should point to a page outside the local documentation.
66
66
 
67
67
  ## AI chat
68
68
 
69
- Add `ai.chat` to enable a documentation-aware chat. `openai`, `claude`, and `grok`
70
- use the OpenAI, Anthropic, and xAI adapters respectively. Keep the key in a
71
- server environment variable; Heyo Docs sends it only from the chat endpoint.
69
+ Add `ai.chat` to enable a documentation-aware chat through [Pi](https://github.com/badlogic/pi-mono).
70
+ Use any provider identifier bundled with the installed Pi version, such as
71
+ `openai`, `anthropic`, `google`, `openrouter`, or `xai`. Authentication stays
72
+ server-only and is selected explicitly for the provider.
72
73
 
73
74
  <CodeBlock language="ts" title="heyo-docs.config.ts">
74
75
  {`ai: {
75
76
  chat: {
76
77
  provider: "openai",
77
- key: process.env.OPENAI_API_KEY!,
78
78
  model: "gpt-5-mini",
79
+ auth: { type: "api-key", token: process.env.OPENAI_API_KEY! },
79
80
  variant: "right", // "center" shows the compact prompt first
80
81
  icon: "chat",
81
82
  text: "AI Chat",
@@ -85,8 +86,14 @@ server environment variable; Heyo Docs sends it only from the chat endpoint.
85
86
  },`}
86
87
  </CodeBlock>
87
88
 
88
- `provider`, `key`, and `model` are required. The model must be an actual model
89
- identifier, not the provider name. `variant` defaults to `right`. `name`
89
+ `provider`, `model`, and `auth` are required. API-key providers use
90
+ `{ type: "api-key", token }`. GitHub Copilot and OpenAI Codex use
91
+ `{ type: "oauth", getAccessToken }`; the resolver runs before each Pi request,
92
+ so it can refresh a short-lived token. Amazon Bedrock uses either
93
+ `{ type: "aws", region?, profile? }` and the AWS credential chain, or
94
+ `{ type: "bedrock-bearer", token, region? }`. The model must be an actual model
95
+ identifier, not the provider name. Amazon Bedrock requires a Node.js chat
96
+ endpoint. `variant` defaults to `right`. `name`
90
97
  defaults to `AI`; it is used for the drawer title and the assistant's message
91
98
  label. `placeholder` defaults to
92
99
  `Ask AI about the docs` and is shared by the compact prompt and drawer input.