@boldare/askdare 0.3.0-rc.0 → 0.3.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/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/dist/ui/askdare.css +1 -1
- package/dist/ui/avatar.tsx +1 -1
- package/dist/ui/chat.tsx +1 -1
- package/dist/ui/confirm.tsx +1 -1
- package/dist/ui/context.ts +1 -1
- package/dist/ui/feedback.tsx +1 -1
- package/dist/ui/footer.tsx +1 -1
- package/dist/ui/header.tsx +1 -1
- package/dist/ui/icons.tsx +1 -1
- package/dist/ui/index.ts +1 -1
- package/dist/ui/message.tsx +1 -1
- package/dist/ui/panel.tsx +1 -1
- package/dist/ui/welcome.tsx +1 -1
- package/docs/costs.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @boldare/askdare
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bca8d48: The chat can show clickable reply options under the latest answer ("Yes, book it", "Show prices"), in the widget and inside a page. A click sends the option as the visitor's own message. It adds a `replies` protocol event (additive in protocol version 1) with `replies` on the latest answer in the history, `ChatMessage.replies`, the `QuickReplies` primitive with the `replies` and `reply` parts, the theme variant `replies` (`answer` puts the options under the answer, `composer` puts them in one row above the message field), the `message.replies` text, and `source: 'reply'` on the `message.sent` chat event. Options are plain text: at most four, up to 80 characters each, without links. The model suggests options with `widget.replies: 'suggest'`, and a tool defines them with `defineTool({ replies })` (ADR-0015).
|
|
8
|
+
- 9fed4d3: A tool can offer clickable reply options derived from its result: `defineTool({ replies: (result) => ['Track the parcel', 'Talk to a person'] })`. `replies` gets the successful result as the model received it (parsed back from JSON) and is typed from `execute`; the options come back after a reload, from the stored call. The same limits as every reply option apply: at most four, up to 80 characters, plain text without links. Only the options reach the browser, never the tool's result (ADR-0015).
|
|
9
|
+
- 35ee326: The chat can switch language without a page load (ADR-0014, step 1). On a page with a bot set to `locale: 'auto'`, `askdare('configure', { locale: 'pl' })` or `data-follow-lang` on the script tag (which follows the page's `<html lang>`) switches the launcher's texts at once and reloads the chat in the new language. The visitor keeps their conversation; new answers follow the new language, as `context.locale` in your `instructions`. An answer still streaming during the switch is reported as `message.received` with `outcome: 'stopped'`, and the server still finishes and stores it. A bot with a fixed locale ignores the switch and says so once in the console. A `configure` call with only `locale` keeps the greeting, starters and context set before. In React, pass the new `locale` to `getChatConfig` as before.
|
|
10
|
+
- 7357c6f: Reply options suggested by the model (ADR-0015). With `widget.replies: 'suggest'`, a bot gets the built-in tool `suggest_replies`: the model can offer 2–4 short replies under an answer, which visitors click instead of typing. The server answers the call itself (no bot code runs), cleans the options up and sends them in the `replies` event; after a reload, the history brings back the options of the latest answer. When the model suggests them after its answer, the message ends without another model call; otherwise it takes one more. `suggest_replies` is now a reserved tool name. Off by default: it costs about 250 input tokens per model call, and sometimes a model call (docs/costs.md).
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 91e6826: The bundled docs no longer say that compaction comes in 0.3, or that `embedPath` and `toolRenderers` come in 0.3: compaction has no release yet, and the other two are planned for 0.4.
|
|
15
|
+
- d08bd22: The README's "What you get" picture now shows what 0.3 adds: clickable answers suggested by the model, reply options from your tools, switching the chat's language from the page, and the one-click deploy.
|
|
16
|
+
- 9cb8282: Reply options with characters the visitor can't see are dropped: zero-width and tag characters, direction marks, private-use and unassigned code points. A click sends an option as the visitor's own message, so it now always says exactly what they read. Emoji built with the zero-width joiner still work.
|
|
17
|
+
|
|
18
|
+
## 0.3.0-rc.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- d08bd22: The README's "What you get" picture now shows what 0.3 adds: clickable answers suggested by the model, reply options from your tools, switching the chat's language from the page, and the one-click deploy.
|
|
23
|
+
|
|
3
24
|
## 0.3.0-rc.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ export const bots = [
|
|
|
38
38
|
|
|
39
39
|
## What you get
|
|
40
40
|
|
|
41
|
-
[](https://askdare.vercel.app/#features)
|
|
42
42
|
|
|
43
43
|
[Knowledge base](https://askdare.vercel.app/docs/knowledge-base) · [Tools](https://askdare.vercel.app/docs/tools) · [Attachments](https://askdare.vercel.app/docs/attachments) · [Voice input](https://askdare.vercel.app/docs/voice-input) · [The chat inside your page (React)](https://askdare.vercel.app/docs/react) · [Answer ratings](https://askdare.vercel.app/docs/feedback) · [Security](https://github.com/boldare/askdare/blob/main/THREAT_MODEL.md)
|
|
44
44
|
|
package/dist/ui/askdare.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
/* Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change. */
|
|
2
2
|
/*
|
|
3
3
|
* Default skin of the chat (ADR-0008, ADR-0011), in the iframe and inside a page. Everything is
|
|
4
4
|
* built on the public styling API: the --ask-* tokens (set per bot by the theme stylesheet), the
|
package/dist/ui/avatar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import { useSkin } from './context';
|
|
4
4
|
import { SparkIcon } from './icons';
|
package/dist/ui/chat.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
// The entry of an ejected copy (`npx @boldare/askdare add ui`): the same DefaultChat as in
|
package/dist/ui/confirm.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import { type KeyboardEvent, type ReactElement, useEffect, useId, useRef } from 'react';
|
|
4
4
|
import { RestartIcon } from './icons';
|
package/dist/ui/context.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ChatBot, Translate } from '@boldare/askdare/react';
|
|
3
3
|
import { type Context, createContext, type RefObject, useContext } from 'react';
|
|
4
4
|
|
package/dist/ui/feedback.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { FeedbackButton, useChat, useChatState, useMessage } from '@boldare/askdare/react';
|
|
3
3
|
import { type FormEvent, type ReactElement, useEffect, useId, useRef, useState } from 'react';
|
|
4
4
|
import { useSkin } from './context';
|
package/dist/ui/footer.tsx
CHANGED
package/dist/ui/header.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
import { Avatar } from './avatar';
|
package/dist/ui/icons.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/** Line icons on a 24px grid, drawn with the current text color. */
|
package/dist/ui/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
// The default look of the chat (ADR-0011): what `npx @boldare/askdare add ui` copies into an app.
|
package/dist/ui/message.tsx
CHANGED
package/dist/ui/panel.tsx
CHANGED
package/dist/ui/welcome.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.3.0
|
|
1
|
+
// Ejected from @boldare/askdare@0.3.0 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import type { ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { Avatar } from './avatar';
|
package/docs/costs.md
CHANGED
|
@@ -155,7 +155,7 @@ A conversation is stored by OpenAI, and every message sends the whole conversati
|
|
|
155
155
|
|
|
156
156
|
- `maxTurns` (default 50) ends a conversation: the visitor is asked to start a new one.
|
|
157
157
|
- askdare sends `truncation: 'auto'`. When a conversation outgrows the model's context window, OpenAI drops the oldest items instead of failing.
|
|
158
|
-
- askdare doesn't compact or summarize conversations
|
|
158
|
+
- askdare doesn't compact or summarize conversations. OpenAI's server-side compaction isn't planned for a release yet: in spikes [S5](https://github.com/boldare/askdare/blob/main/spikes/s5-compaction/README.md) and S5b it cut answers off, ran on every turn and lost prompt caching ([ADR-0003](https://github.com/boldare/askdare/blob/main/docs/adr/0003-conversation-state.md)).
|
|
159
159
|
- Attached files and your tools' results stay in the conversation, so every later message reads them again. Keep tool results small ([Tools](tools.md)).
|
|
160
160
|
|
|
161
161
|
## Prompt caching
|
package/package.json
CHANGED