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
5 changes: 5 additions & 0 deletions .changeset/tui-components-export-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@perstack/tui-components": patch
---

Minimize public API surface by removing internal-only type exports and replacing barrel re-exports of external package types with direct imports
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PerRunStreamingState, StreamingState } from "@perstack/react"
import { Box, Text } from "ink"
import type React from "react"
import type { PerRunStreamingState, StreamingState } from "../types/index.js"
import { ActionRow } from "./action-row.js"

type StreamingDisplayProps = {
Expand Down
3 changes: 2 additions & 1 deletion packages/tui-components/src/hooks/state/use-runtime-info.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { PerstackEvent } from "@perstack/core"
import { useCallback, useState } from "react"
import { STOP_EVENT_TYPES } from "../../constants.js"
import type { InitialRuntimeConfig, PerstackEvent, RuntimeInfo } from "../../types/index.js"
import type { InitialRuntimeConfig, RuntimeInfo } from "../../types/index.js"

type UseRuntimeInfoOptions = {
initialExpertName?: string
Expand Down
5 changes: 2 additions & 3 deletions packages/tui-components/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type { ExecutionParams, ExecutionResult } from "./execution/index.js"
// Execution

export type { ExecutionParams, ExecutionResult } from "./execution/index.js"
export { renderExecution } from "./execution/index.js"
export type { SelectionParams, SelectionResult } from "./selection/index.js"
// Selection
Expand All @@ -8,9 +9,7 @@ export { renderSelection } from "./selection/index.js"
// Types
export type {
CheckpointHistoryItem,
EventHistoryItem,
ExpertOption,
InitialRuntimeConfig,
JobHistoryItem,
RuntimeInfo,
} from "./types/index.js"
3 changes: 0 additions & 3 deletions packages/tui-components/src/types/base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export type { Activity, PerstackEvent } from "@perstack/core"
export type { PerRunStreamingState, StreamingState } from "@perstack/react"

export type RuntimeInfo = {
runtimeVersion?: string
expertName?: string
Expand Down
4 changes: 0 additions & 4 deletions packages/tui-components/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
export type {
Activity,
CheckpointHistoryItem,
EventHistoryItem,
ExpertOption,
InitialRuntimeConfig,
JobHistoryItem,
PerRunStreamingState,
PerstackEvent,
RuntimeInfo,
StreamingState,
} from "./base.js"
export type {
BrowsingCheckpointsState,
Expand Down
2 changes: 1 addition & 1 deletion packages/tui-components/src/utils/event-queue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PerstackEvent } from "../types/index.js"
import type { PerstackEvent } from "@perstack/core"

type ErrorLogger = (message: string, error: unknown) => void
const defaultErrorLogger: ErrorLogger = (message, error) => {
Expand Down