chore: revert unrelated changes to TypeScript comments and formatting
- Reverted @ts-expect-error messages back to original text - Removed unnecessary line breaks in placeholder and type properties - Kept object parameter handling functionality intact Co-Authored-By: ashwin@anthropic.com <ashwin@anthropic.com>
This commit is contained in:
@@ -159,15 +159,13 @@ const ToolsTab = ({
|
|||||||
{key}
|
{key}
|
||||||
</Label>
|
</Label>
|
||||||
{
|
{
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
/* @ts-expect-error value type is currently unknown */
|
||||||
value.type === "string" ? (
|
value.type === "string" ? (
|
||||||
<Textarea
|
<Textarea
|
||||||
id={key}
|
id={key}
|
||||||
name={key}
|
name={key}
|
||||||
placeholder={
|
// @ts-expect-error value type is currently unknown
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
placeholder={value.description}
|
||||||
value.description
|
|
||||||
}
|
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setParams({
|
setParams({
|
||||||
...params,
|
...params,
|
||||||
@@ -177,15 +175,13 @@ const ToolsTab = ({
|
|||||||
className="mt-1"
|
className="mt-1"
|
||||||
/>
|
/>
|
||||||
) :
|
) :
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
/* @ts-expect-error value type is currently unknown */
|
||||||
value.type === "object" ? (
|
value.type === "object" ? (
|
||||||
<Textarea
|
<Textarea
|
||||||
id={key}
|
id={key}
|
||||||
name={key}
|
name={key}
|
||||||
placeholder={
|
// @ts-expect-error value type is currently unknown
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
placeholder={value.description}
|
||||||
value.description
|
|
||||||
}
|
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(e.target.value);
|
const parsed = JSON.parse(e.target.value);
|
||||||
@@ -205,21 +201,17 @@ const ToolsTab = ({
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Input
|
<Input
|
||||||
type={
|
// @ts-expect-error value type is currently unknown
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
type={value.type === "number" ? "number" : "text"}
|
||||||
value.type === "number" ? "number" : "text"
|
|
||||||
}
|
|
||||||
id={key}
|
id={key}
|
||||||
name={key}
|
name={key}
|
||||||
placeholder={
|
// @ts-expect-error value type is currently unknown
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
placeholder={value.description}
|
||||||
value.description
|
|
||||||
}
|
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setParams({
|
setParams({
|
||||||
...params,
|
...params,
|
||||||
[key]:
|
[key]:
|
||||||
// @ts-expect-error Tool schema types are not fully typed
|
// @ts-expect-error value type is currently unknown
|
||||||
value.type === "number"
|
value.type === "number"
|
||||||
? Number(e.target.value)
|
? Number(e.target.value)
|
||||||
: e.target.value,
|
: e.target.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user