Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ jobs:
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Generate Docs
run: pnpm generate-docs
run: pnpm format
- name: Apply fixes
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
title: "ci: Version Packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate Docs
if: steps.changesets.outputs.published == 'true'
run: pnpm generate-docs
- name: Commit Generated Docs
if: steps.changesets.outputs.published == 'true'
run: |
Expand All @@ -56,3 +58,8 @@ jobs:
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: tanstack/config/.github/comment-on-release@main
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
"test": "pnpm run test:ci",
"test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:pr": "nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build",
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build",
"test:eslint": "nx affected --target=test:eslint --exclude=examples/**",
"test:format": "pnpm run prettier --check",
"test:sherif": "sherif",
"test:lib": "nx affected --targets=test:lib --exclude=examples/**",
"test:lib:dev": "pnpm test:lib && nx watch --all -- pnpm test:lib",
Expand All @@ -31,17 +30,16 @@
"build:all": "nx run-many --targets=build --exclude=examples/**",
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"dev": "pnpm run watch",
"prettier": "prettier --ignore-unknown '**/*'",
"prettier:write": "pnpm run prettier --write",
"format": "prettier --experimental-cli --ignore-unknown '**/*' --write",
"generate-docs": "node scripts/generate-docs.ts && pnpm run copy:readme",
"copy:readme": "cp README.md packages/typescript/ai/README.md && cp README.md packages/typescript/ai-devtools/README.md && cp README.md packages/typescript/ai-client/README.md && cp README.md packages/typescript/ai-gemini/README.md && cp README.md packages/typescript/ai-ollama/README.md && cp README.md packages/typescript/ai-openai/README.md && cp README.md packages/typescript/ai-react/README.md && cp README.md packages/typescript/ai-react-ui/README.md && cp README.md packages/typescript/react-ai-devtools/README.md && cp README.md packages/typescript/solid-ai-devtools/README.md",
"format": "pnpm run prettier:write",
"changeset": "changeset",
"changeset:publish": "changeset publish",
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile && pnpm prettier:write"
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile && pnpm format"
},
"nx": {
"includedScripts": [
"test:docs",
"test:knip",
"test:sherif"
]
Expand All @@ -61,7 +59,7 @@
"markdown-link-extractor": "^4.0.3",
"nx": "22.1.2",
"premove": "^4.0.0",
"prettier": "^3.6.2",
"prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.4.0",
"publint": "^0.3.15",
"sherif": "^1.9.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ export type ExternalTextProviderOptions = AnthropicContainerOptions &
AnthropicToolChoiceOptions &
AnthropicSamplingOptions

export interface InternalTextProviderOptions
extends ExternalTextProviderOptions {
export interface InternalTextProviderOptions extends ExternalTextProviderOptions {
model: string

messages: Array<MessageParam>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export const ChunksCollapsible: Component<ChunksCollapsibleProps> = (props) => {
<details class={styles().conversationDetails.chunksDetails}>
<summary class={styles().conversationDetails.chunksSummary}>
<div class={styles().conversationDetails.chunksSummaryRow}>
<span class={styles().conversationDetails.chunksSummaryArrow}>
</span>
<span class={styles().conversationDetails.chunksSummaryArrow}>▶</span>
<span class={styles().conversationDetails.chunksSummaryTitle}>
📦 {totalRawChunks()} chunks
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ export type ExternalTextProviderOptions = OpenAIBaseOptions &
* Options your SDK forwards to OpenAI when doing chat/responses.
* Tip: gate these by model capability in your SDK, not just by presence.
*/
export interface InternalTextProviderOptions
extends ExternalTextProviderOptions {
export interface InternalTextProviderOptions extends ExternalTextProviderOptions {
input: string | OpenAI.Responses.ResponseInput
/**
* A system (or developer) message inserted into the model's context.
Expand Down
26 changes: 11 additions & 15 deletions packages/typescript/ai/src/base-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,24 @@ export abstract class BaseAdapter<
TChatProviderOptions extends Record<string, any> = Record<string, any>,
TEmbeddingProviderOptions extends Record<string, any> = Record<string, any>,
TModelProviderOptionsByName extends Record<string, any> = Record<string, any>,
TModelInputModalitiesByName extends Record<
string,
ReadonlyArray<Modality>
> = Record<string, ReadonlyArray<Modality>>,
TModelInputModalitiesByName extends Record<string, ReadonlyArray<Modality>> =
Record<string, ReadonlyArray<Modality>>,
TMessageMetadataByModality extends {
text: unknown
image: unknown
audio: unknown
video: unknown
document: unknown
} = DefaultMessageMetadataByModality,
> implements
AIAdapter<
TChatModels,
TEmbeddingModels,
TChatProviderOptions,
TEmbeddingProviderOptions,
TModelProviderOptionsByName,
TModelInputModalitiesByName,
TMessageMetadataByModality
>
{
> implements AIAdapter<
TChatModels,
TEmbeddingModels,
TChatProviderOptions,
TEmbeddingProviderOptions,
TModelProviderOptionsByName,
TModelInputModalitiesByName,
TMessageMetadataByModality
> {
abstract name: string
abstract models: TChatModels
embeddingModels?: TEmbeddingModels
Expand Down
6 changes: 2 additions & 4 deletions packages/typescript/ai/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,8 @@ export interface AIAdapter<
TChatProviderOptions extends Record<string, any> = Record<string, any>,
TEmbeddingProviderOptions extends Record<string, any> = Record<string, any>,
TModelProviderOptionsByName extends Record<string, any> = Record<string, any>,
TModelInputModalitiesByName extends Record<
string,
ReadonlyArray<Modality>
> = Record<string, ReadonlyArray<Modality>>,
TModelInputModalitiesByName extends Record<string, ReadonlyArray<Modality>> =
Record<string, ReadonlyArray<Modality>>,
TMessageMetadataByModality extends {
text: unknown
image: unknown
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading