mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
chore(react-textarea): mark CopilotTextarea declarations as deprecated
The generated v1 notices tag the re-export specifiers in
`packages/react-textarea/src/index.tsx`, but the declarations themselves
carried no `@deprecated` JSDoc. Two consequences:
- Resolving `CopilotTextarea` or `CopilotTextareaProps` through the
components barrel or at the definition gave no IDE warning.
- More importantly, the dts bundler collapses the tagged specifiers into
a bare `export { ... }`, so the published `dist/index.d.cts` and
`dist/index.d.mts` shipped zero `@deprecated` tags. npm consumers saw
no deprecation at all, including through the package root.
Tag both declarations with the same text the generator emits. The
file-level generated notice is unaffected, so
`scripts/deprecations/v1-source-notices.mjs --check` stays clean and
regeneration is a no-op for this file.
Refs #6819
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -121,8 +121,17 @@ import { useMakeStandardInsertionOrEditingFunction } from "../../hooks/make-auto
|
||||
import merge from "lodash.merge";
|
||||
import type { AutosuggestionsConfigUserSpecified } from "../../types/autosuggestions-config/autosuggestions-config-user-specified";
|
||||
|
||||
// Like the base copilot textarea props,
|
||||
// but with baseAutosuggestionsConfig replaced with autosuggestionsConfig.
|
||||
/**
|
||||
* Like the base copilot textarea props,
|
||||
* but with baseAutosuggestionsConfig replaced with autosuggestionsConfig.
|
||||
*
|
||||
* @deprecated Since 1.68.2. The v1 SDK is deprecated. Use v2 instead.
|
||||
* No 1:1 v2 replacement is available.
|
||||
* Start with `@copilotkit/react-core/v2`.
|
||||
* V2 docs: https://docs.copilotkit.ai/
|
||||
* V2 reference docs: https://docs.copilotkit.ai/reference/v2
|
||||
* Migration guide: https://docs.copilotkit.ai/migrate/v2
|
||||
*/
|
||||
export interface CopilotTextareaProps extends Omit<
|
||||
BaseCopilotTextareaProps,
|
||||
"baseAutosuggestionsConfig"
|
||||
@@ -191,6 +200,13 @@ export interface CopilotTextareaProps extends Omit<
|
||||
|
||||
/**
|
||||
* A copilot textarea that uses the standard autosuggestions function.
|
||||
*
|
||||
* @deprecated Since 1.68.2. The v1 SDK is deprecated. Use v2 instead.
|
||||
* No 1:1 v2 replacement is available.
|
||||
* Start with `@copilotkit/react-core/v2`.
|
||||
* V2 docs: https://docs.copilotkit.ai/
|
||||
* V2 reference docs: https://docs.copilotkit.ai/reference/v2
|
||||
* Migration guide: https://docs.copilotkit.ai/migrate/v2
|
||||
*/
|
||||
export const CopilotTextarea = React.forwardRef(
|
||||
(props: CopilotTextareaProps, ref: React.Ref<HTMLCopilotTextAreaElement>) => {
|
||||
|
||||
Reference in New Issue
Block a user