Skip to content

Commit 31d704f

Browse files
committed
feat!: remove useDelayedAutofocus and ToolProviderMark
Nothing in the library, its stories or its known consumers uses either export, and this release already breaks the chat surface. Drop them rather than carry untested API: ProviderMark stays, and a host reads the provider off a tool id itself. The 0.3 upgrade table lists both with what to use instead.
1 parent 7bd2fdd commit 31d704f

4 files changed

Lines changed: 2 additions & 54 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ The host app owns the connection to the hub; components only take props.
331331
The old chat family is removed. The conversation family replaces it: a message is a `ConversationMessage` whose `parts` are a `ConversationPart[]` (discriminated by `kind`), and the components are built from parts you compose rather than one component per screen.
332332
333333
- `Part`, `PartText`, `PartReasoning`, `PartToolTrace`, `PartBlock`, `PartFile`, `PartEvent` and `ToolTraceStatus` are unchanged and still import from the root.
334-
- `ToolProviderMark` takes the raw tool id as `toolName` instead of a `part` (`<ToolProviderMark toolName={part.name} />`); its props are `ToolProviderMarkProps`.
335-
- `useDelayedAutofocus` is unchanged.
336334
337335
Removed exports and what replaces them:
338336
@@ -368,6 +366,8 @@ Removed exports and what replaces them:
368366
| `messageText`, `reasoningText`, `toolParts` | No replacement: filter `message.parts` by `kind` |
369367
| `isTurnWorking` | `parts.some((p) => p.kind === "tool-trace" && p.status === "running")` (any tool still running; `message.status === "streaming"` is the whole message) |
370368
| `toolLabel` | No replacement: `ToolHeader` shows the raw tool name, after the `label` you pass |
369+
| `ToolProviderMark`, `ToolProviderMarkProps` | `ProviderMark` with the provider read off the tool id (`name.split("__")[0]`, for ids shaped `provider__operation`) |
370+
| `useDelayedAutofocus` | No replacement: focus the element from an effect once its entrance has finished |
371371
372372
## Upgrading from 0.1
373373

‎src/hooks/use-delayed-autofocus.ts‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export * from "./blocks/login/auth-layout.js";
1414
export * from "./blocks/login/login-form.js";
1515
export * from "./hooks/use-command-palette-navigation.js";
1616
export * from "./hooks/use-controllable-state.js";
17-
export * from "./hooks/use-delayed-autofocus.js";
1817
export * from "./hooks/use-dismissable-popover.js";
1918
export * from "./hooks/use-list-selection.js";
2019
export * from "./hooks/use-prefers-reduced-motion.js";

‎src/ui/provider-mark.tsx‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,3 @@ export function ProviderMark({
4848
</span>
4949
);
5050
}
51-
52-
export type ToolProviderMarkProps = {
53-
/** Raw tool id, e.g. `slack__post_message`. */
54-
readonly toolName: string;
55-
readonly logo?: ReactNode;
56-
readonly className?: string | undefined;
57-
};
58-
59-
/**
60-
* The provider marker for a tool call in a transcript.
61-
*
62-
* The provider is read off the tool id's `provider__operation` prefix, so a
63-
* tool with no prefix is local and gets no marker rather than a guessed one.
64-
*/
65-
export function ToolProviderMark({
66-
toolName,
67-
logo,
68-
className,
69-
}: ToolProviderMarkProps) {
70-
const [provider, ...rest] = toolName.split("__");
71-
if (rest.length === 0 || provider === undefined || provider === "")
72-
return null;
73-
return <ProviderMark provider={provider} logo={logo} className={className} />;
74-
}

0 commit comments

Comments
 (0)