chore: better error message for ai agent + add back .ts in utils-internal (#6544)

* better error message

* add back ext after publishing

* add back ext
This commit is contained in:
centdix
2025-09-05 16:52:41 +02:00
committed by GitHub
parent dbaf068b02
commit 357d22deeb
10 changed files with 17 additions and 16 deletions

View File

@@ -1010,8 +1010,8 @@ async fn run_agent(
// Parse content as JSON, fallback to string if it fails
let output_value = match content {
Some(content_str) => match has_output_properties {
true => serde_json::from_str::<Box<RawValue>>(&content_str).map_err(|e| {
Error::internal_err(format!("Failed to parse structured output: {}", e))
true => serde_json::from_str::<Box<RawValue>>(&content_str).map_err(|_e| {
Error::internal_err(format!("Failed to parse structured output: {}", content_str))
})?,
false => to_raw_value(&content_str),
},

View File

@@ -9,3 +9,4 @@ rm -rf "${script_dirpath}/dist"
npm install
npm run build
npm publish ${args}
./remove-ts-ext.sh -r

View File

@@ -1 +1 @@
export * from "./config";
export * from "./config.ts";

View File

@@ -8,8 +8,8 @@
* - Cross-platform path constants
*/
export * from "./inline-scripts";
export * from "./path-utils";
export * from "./parse";
export * from "./config";
export { SEP, DELIMITER } from "./constants";
export * from "./inline-scripts.ts";
export * from "./path-utils.ts";
export * from "./parse.ts";
export * from "./config.ts";
export { SEP, DELIMITER } from "./constants.ts";

View File

@@ -1,5 +1,5 @@
import { newPathAssigner } from "../path-utils/path-assigner";
import { FlowModule } from "../gen/types.gen";
import { newPathAssigner } from "../path-utils/path-assigner.ts";
import { FlowModule } from "../gen/types.gen.ts";
/**
* Represents an inline script extracted from a flow module

View File

@@ -1,2 +1,2 @@
export * from "./replacer";
export * from "./extractor";
export * from "./replacer.ts";
export * from "./extractor.ts";

View File

@@ -1,4 +1,4 @@
import { FlowModule } from "../gen/types.gen";
import { FlowModule } from "../gen/types.gen.ts";
/**
* Replaces inline script references with actual file content from the filesystem.

View File

@@ -1 +1 @@
export * from "./parse-schema";
export * from "./parse-schema.ts";

View File

@@ -1 +1 @@
export * from "./path-assigner";
export * from "./path-assigner.ts";

View File

@@ -1,4 +1,4 @@
import { RawScript } from "../gen/types.gen";
import { RawScript } from "../gen/types.gen.ts";
const INLINE_SCRIPT_PREFIX = "inline_script";