@dimivelev/chimera 0.78.0 → 0.78.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +6 -10
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -9
- package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -1677
- package/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
- package/node_modules/@anthropic-ai/sdk/README.md +0 -674
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +0 -226
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.js +0 -6
- package/node_modules/@anthropic-ai/sdk/api-promise.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/api-promise.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/bin/cli +0 -53
- package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +0 -7
- package/node_modules/@anthropic-ai/sdk/client.d.mts +0 -225
- package/node_modules/@anthropic-ai/sdk/client.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/client.d.ts +0 -225
- package/node_modules/@anthropic-ai/sdk/client.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/client.js +0 -536
- package/node_modules/@anthropic-ai/sdk/client.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/client.mjs +0 -531
- package/node_modules/@anthropic-ai/sdk/client.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +0 -49
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +0 -49
- package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.js +0 -76
- package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +0 -72
- package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/error.d.mts +0 -47
- package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/error.d.ts +0 -47
- package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/error.js +0 -114
- package/node_modules/@anthropic-ai/sdk/core/error.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/error.mjs +0 -98
- package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +0 -63
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +0 -63
- package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.js +0 -123
- package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +0 -117
- package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.d.mts +0 -6
- package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.d.ts +0 -6
- package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.js +0 -11
- package/node_modules/@anthropic-ai/sdk/core/resource.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.mjs +0 -7
- package/node_modules/@anthropic-ai/sdk/core/resource.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +0 -31
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +0 -31
- package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.js +0 -282
- package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +0 -277
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.js +0 -6
- package/node_modules/@anthropic-ai/sdk/core/uploads.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/core/uploads.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/error.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/error.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/error.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/error.js +0 -6
- package/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/error.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/index.d.mts +0 -7
- package/node_modules/@anthropic-ai/sdk/index.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/index.d.ts +0 -7
- package/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/index.js +0 -35
- package/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/index.mjs +0 -8
- package/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts +0 -73
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts +0 -73
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +0 -4
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -12
- package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts +0 -10
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +0 -10
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +0 -39
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +0 -35
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +0 -17
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +0 -17
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +0 -113
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +0 -108
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +0 -162
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +0 -157
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.js +0 -41
- package/node_modules/@anthropic-ai/sdk/internal/errors.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.mjs +0 -36
- package/node_modules/@anthropic-ai/sdk/internal/errors.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +0 -22
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +0 -22
- package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.js +0 -79
- package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +0 -74
- package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +0 -17
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +0 -17
- package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.js +0 -55
- package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +0 -51
- package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +0 -34
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +0 -34
- package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.js +0 -14
- package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +0 -10
- package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts +0 -28
- package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts +0 -28
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +0 -20
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +0 -20
- package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.js +0 -92
- package/node_modules/@anthropic-ai/sdk/internal/shims.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.mjs +0 -85
- package/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts +0 -8
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts +0 -8
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js +0 -38
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs +0 -35
- package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts +0 -45
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts +0 -45
- package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.js +0 -96
- package/node_modules/@anthropic-ai/sdk/internal/to-file.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +0 -93
- package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/tslib.js +0 -81
- package/node_modules/@anthropic-ai/sdk/internal/tslib.mjs +0 -17
- package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +0 -67
- package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +0 -67
- package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.js +0 -4
- package/node_modules/@anthropic-ai/sdk/internal/types.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/types.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts +0 -42
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts +0 -42
- package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.js +0 -146
- package/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +0 -136
- package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +0 -38
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +0 -33
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +0 -4
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +0 -4
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +0 -31
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +0 -26
- package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +0 -9
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +0 -9
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.js +0 -22
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +0 -18
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +0 -37
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +0 -37
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +0 -86
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +0 -80
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.js +0 -58
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs +0 -53
- package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +0 -7
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts +0 -5
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +0 -19
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +0 -15
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts +0 -16
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts +0 -16
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.js +0 -109
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +0 -92
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +0 -7
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts +0 -7
- package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.js +0 -11
- package/node_modules/@anthropic-ai/sdk/internal/utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.mjs +0 -8
- package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +0 -114
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +0 -114
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +0 -553
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +0 -549
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +0 -114
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -114
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -553
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -549
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/package.json +0 -185
- package/node_modules/@anthropic-ai/sdk/pagination.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/pagination.js +0 -6
- package/node_modules/@anthropic-ai/sdk/pagination.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/pagination.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resource.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resource.js +0 -6
- package/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resource.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +0 -61
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -61
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -25
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -20
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +0 -151
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +0 -151
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +0 -122
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +0 -118
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +0 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -13
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +0 -343
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +0 -343
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +0 -204
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +0 -200
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +0 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +0 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +0 -1561
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +0 -1561
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +0 -86
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +0 -81
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +0 -74
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +0 -74
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +0 -60
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +0 -56
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.js +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +0 -183
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -183
- package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -23
- package/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -19
- package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.js +0 -15
- package/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -7
- package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +0 -304
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +0 -304
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +0 -153
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +0 -149
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.js +0 -9
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +0 -4
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +0 -1264
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +0 -1264
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +0 -72
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +0 -67
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -6
- package/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.d.mts +0 -59
- package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.d.ts +0 -59
- package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.js +0 -45
- package/node_modules/@anthropic-ai/sdk/resources/models.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.mjs +0 -41
- package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts +0 -42
- package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts +0 -42
- package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.js +0 -4
- package/node_modules/@anthropic-ai/sdk/resources/shared.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/shared.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
- package/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
- package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources.js +0 -5
- package/node_modules/@anthropic-ai/sdk/resources.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/resources.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/resources.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +0 -3
- package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
- package/node_modules/@anthropic-ai/sdk/src/api-promise.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/client.ts +0 -1070
- package/node_modules/@anthropic-ai/sdk/src/core/README.md +0 -3
- package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +0 -101
- package/node_modules/@anthropic-ai/sdk/src/core/error.ts +0 -133
- package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +0 -201
- package/node_modules/@anthropic-ai/sdk/src/core/resource.ts +0 -11
- package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +0 -331
- package/node_modules/@anthropic-ai/sdk/src/core/uploads.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/error.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/index.ts +0 -23
- package/node_modules/@anthropic-ai/sdk/src/internal/README.md +0 -3
- package/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +0 -93
- package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -12
- package/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts +0 -48
- package/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts +0 -135
- package/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +0 -196
- package/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +0 -33
- package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +0 -99
- package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +0 -84
- package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +0 -39
- package/node_modules/@anthropic-ai/sdk/src/internal/shim-types.d.ts +0 -28
- package/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +0 -107
- package/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts +0 -32
- package/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +0 -159
- package/node_modules/@anthropic-ai/sdk/src/internal/types.ts +0 -92
- package/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +0 -193
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +0 -40
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +0 -32
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +0 -18
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +0 -127
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts +0 -65
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +0 -17
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +0 -102
- package/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +0 -8
- package/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
- package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +0 -683
- package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -684
- package/node_modules/@anthropic-ai/sdk/src/pagination.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -380
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +0 -258
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -148
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +0 -502
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +0 -135
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +0 -2249
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +0 -118
- package/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -231
- package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -121
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +0 -396
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +0 -110
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +0 -1783
- package/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +0 -103
- package/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +0 -72
- package/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
- package/node_modules/@anthropic-ai/sdk/src/resources.ts +0 -1
- package/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
- package/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
- package/node_modules/@anthropic-ai/sdk/streaming.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/streaming.js +0 -6
- package/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/uploads.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/uploads.js +0 -6
- package/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
- package/node_modules/@anthropic-ai/sdk/version.d.mts +0 -2
- package/node_modules/@anthropic-ai/sdk/version.d.mts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sdk/version.js +0 -5
- package/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
- package/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
- package/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts +0 -24
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js +0 -502
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts +0 -118
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js +0 -402
- package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts +0 -95
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js +0 -963
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -53
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js +0 -175
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts +0 -95
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js +0 -528
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts +0 -25
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js +0 -131
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts +0 -51
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js +0 -486
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts +0 -51
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js +0 -102
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts +0 -48
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js +0 -230
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js +0 -101
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -33
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js +0 -231
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js +0 -42
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts +0 -25
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js +0 -114
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js +0 -39
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts +0 -33
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js +0 -210
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts +0 -2
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js +0 -50
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts +0 -44
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js +0 -311
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js +0 -30
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts +0 -615
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js +0 -94
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts +0 -14
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js +0 -126
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts +0 -70
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js +0 -290
- package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts +0 -20
- package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/index.js +0 -25
- package/node_modules/@dimivelev/chimera-agent-core/dist/index.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/node.js +0 -3
- package/node_modules/@dimivelev/chimera-agent-core/dist/node.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts +0 -69
- package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js +0 -278
- package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts +0 -393
- package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/dist/types.js +0 -2
- package/node_modules/@dimivelev/chimera-agent-core/dist/types.js.map +0 -1
- package/node_modules/@dimivelev/chimera-agent-core/package.json +0 -60
- package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts +0 -20
- package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js +0 -44
- package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts +0 -5
- package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js +0 -6
- package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/cli.js +0 -130
- package/node_modules/@dimivelev/chimera-ai/dist/cli.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts +0 -18
- package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js +0 -178
- package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts +0 -10
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts +0 -4
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js +0 -6
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.js +0 -23
- package/node_modules/@dimivelev/chimera-ai/dist/image-models.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts +0 -14
- package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js +0 -22
- package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts +0 -4
- package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/images.js +0 -14
- package/node_modules/@dimivelev/chimera-ai/dist/images.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts +0 -32
- package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/index.js +0 -20
- package/node_modules/@dimivelev/chimera-ai/dist/index.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts +0 -18
- package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts +0 -14714
- package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js +0 -13379
- package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/models.js +0 -71
- package/node_modules/@dimivelev/chimera-ai/dist/models.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts +0 -2
- package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/oauth.js +0 -2
- package/node_modules/@dimivelev/chimera-ai/dist/oauth.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts +0 -38
- package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js +0 -826
- package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts +0 -71
- package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js +0 -959
- package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts +0 -15
- package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js +0 -221
- package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts +0 -13
- package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js +0 -26
- package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts +0 -56
- package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js +0 -368
- package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts +0 -8
- package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js +0 -29
- package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts +0 -70
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js +0 -329
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts +0 -15
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js +0 -442
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts +0 -13
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js +0 -402
- package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js +0 -128
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts +0 -4
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js +0 -34
- package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts +0 -25
- package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js +0 -534
- package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts +0 -30
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js +0 -1171
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts +0 -19
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js +0 -956
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js +0 -10
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts +0 -18
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js +0 -495
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts +0 -13
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js +0 -233
- package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts +0 -35
- package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js +0 -254
- package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts +0 -8
- package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js +0 -42
- package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts +0 -8
- package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js +0 -184
- package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts +0 -4
- package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js +0 -22
- package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts +0 -8
- package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/stream.js +0 -39
- package/node_modules/@dimivelev/chimera-ai/dist/stream.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts +0 -514
- package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/types.js +0 -2
- package/node_modules/@dimivelev/chimera-ai/dist/types.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts +0 -6
- package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js +0 -34
- package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts +0 -19
- package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js +0 -25
- package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts +0 -21
- package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js +0 -81
- package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js +0 -14
- package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts +0 -2
- package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js +0 -8
- package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts +0 -16
- package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js +0 -113
- package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts +0 -10
- package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js +0 -97
- package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts +0 -25
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js +0 -335
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts +0 -21
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js +0 -56
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts +0 -30
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js +0 -268
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts +0 -58
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js +0 -122
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js +0 -105
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts +0 -43
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js +0 -485
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts +0 -13
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js +0 -31
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts +0 -64
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js +0 -2
- package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts +0 -57
- package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js +0 -154
- package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts +0 -22
- package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js +0 -26
- package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts +0 -17
- package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js +0 -21
- package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts +0 -18
- package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js +0 -281
- package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js.map +0 -1
- package/node_modules/@dimivelev/chimera-ai/package.json +0 -106
- package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js +0 -632
- package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/box.js +0 -104
- package/node_modules/@dimivelev/chimera-tui/dist/components/box.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js +0 -1857
- package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/image.js +0 -89
- package/node_modules/@dimivelev/chimera-tui/dist/components/image.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/input.js +0 -378
- package/node_modules/@dimivelev/chimera-tui/dist/components/input.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js +0 -69
- package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js +0 -644
- package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js +0 -159
- package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js +0 -23
- package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/text.js +0 -89
- package/node_modules/@dimivelev/chimera-tui/dist/components/text.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js +0 -2
- package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js +0 -110
- package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts +0 -23
- package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/index.js +0 -32
- package/node_modules/@dimivelev/chimera-tui/dist/index.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts +0 -193
- package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js +0 -174
- package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts +0 -184
- package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/keys.js +0 -1173
- package/node_modules/@dimivelev/chimera-tui/dist/keys.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js +0 -44
- package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js +0 -366
- package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/terminal.js +0 -472
- package/node_modules/@dimivelev/chimera-tui/dist/terminal.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts +0 -242
- package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/tui.js +0 -1221
- package/node_modules/@dimivelev/chimera-tui/dist/tui.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js +0 -25
- package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts +0 -84
- package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/utils.js +0 -1029
- package/node_modules/@dimivelev/chimera-tui/dist/utils.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js +0 -96
- package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@dimivelev/chimera-tui/package.json +0 -47
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { fuzzyFilter } from "../fuzzy.js";
|
|
2
|
-
import { getKeybindings } from "../keybindings.js";
|
|
3
|
-
import { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "../utils.js";
|
|
4
|
-
import { Input } from "./input.js";
|
|
5
|
-
export class SettingsList {
|
|
6
|
-
items;
|
|
7
|
-
filteredItems;
|
|
8
|
-
theme;
|
|
9
|
-
selectedIndex = 0;
|
|
10
|
-
maxVisible;
|
|
11
|
-
onChange;
|
|
12
|
-
onCancel;
|
|
13
|
-
searchInput;
|
|
14
|
-
searchEnabled;
|
|
15
|
-
// Submenu state
|
|
16
|
-
submenuComponent = null;
|
|
17
|
-
submenuItemIndex = null;
|
|
18
|
-
constructor(items, maxVisible, theme, onChange, onCancel, options = {}) {
|
|
19
|
-
this.items = items;
|
|
20
|
-
this.filteredItems = items;
|
|
21
|
-
this.maxVisible = maxVisible;
|
|
22
|
-
this.theme = theme;
|
|
23
|
-
this.onChange = onChange;
|
|
24
|
-
this.onCancel = onCancel;
|
|
25
|
-
this.searchEnabled = options.enableSearch ?? false;
|
|
26
|
-
if (this.searchEnabled) {
|
|
27
|
-
this.searchInput = new Input();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/** Update an item's currentValue */
|
|
31
|
-
updateValue(id, newValue) {
|
|
32
|
-
const item = this.items.find((i) => i.id === id);
|
|
33
|
-
if (item) {
|
|
34
|
-
item.currentValue = newValue;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
invalidate() {
|
|
38
|
-
this.submenuComponent?.invalidate?.();
|
|
39
|
-
}
|
|
40
|
-
render(width) {
|
|
41
|
-
// If submenu is active, render it instead
|
|
42
|
-
if (this.submenuComponent) {
|
|
43
|
-
return this.submenuComponent.render(width);
|
|
44
|
-
}
|
|
45
|
-
return this.renderMainList(width);
|
|
46
|
-
}
|
|
47
|
-
renderMainList(width) {
|
|
48
|
-
const lines = [];
|
|
49
|
-
if (this.searchEnabled && this.searchInput) {
|
|
50
|
-
lines.push(...this.searchInput.render(width));
|
|
51
|
-
lines.push("");
|
|
52
|
-
}
|
|
53
|
-
if (this.items.length === 0) {
|
|
54
|
-
lines.push(this.theme.hint(" No settings available"));
|
|
55
|
-
if (this.searchEnabled) {
|
|
56
|
-
this.addHintLine(lines, width);
|
|
57
|
-
}
|
|
58
|
-
return lines;
|
|
59
|
-
}
|
|
60
|
-
const displayItems = this.searchEnabled ? this.filteredItems : this.items;
|
|
61
|
-
if (displayItems.length === 0) {
|
|
62
|
-
lines.push(truncateToWidth(this.theme.hint(" No matching settings"), width));
|
|
63
|
-
this.addHintLine(lines, width);
|
|
64
|
-
return lines;
|
|
65
|
-
}
|
|
66
|
-
// Calculate visible range with scrolling
|
|
67
|
-
const startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisible / 2), displayItems.length - this.maxVisible));
|
|
68
|
-
const endIndex = Math.min(startIndex + this.maxVisible, displayItems.length);
|
|
69
|
-
// Calculate max label width for alignment
|
|
70
|
-
const maxLabelWidth = Math.min(30, Math.max(...this.items.map((item) => visibleWidth(item.label))));
|
|
71
|
-
// Render visible items
|
|
72
|
-
for (let i = startIndex; i < endIndex; i++) {
|
|
73
|
-
const item = displayItems[i];
|
|
74
|
-
if (!item)
|
|
75
|
-
continue;
|
|
76
|
-
const isSelected = i === this.selectedIndex;
|
|
77
|
-
const prefix = isSelected ? this.theme.cursor : " ";
|
|
78
|
-
const prefixWidth = visibleWidth(prefix);
|
|
79
|
-
// Pad label to align values
|
|
80
|
-
const labelPadded = item.label + " ".repeat(Math.max(0, maxLabelWidth - visibleWidth(item.label)));
|
|
81
|
-
const labelText = this.theme.label(labelPadded, isSelected);
|
|
82
|
-
// Calculate space for value
|
|
83
|
-
const separator = " ";
|
|
84
|
-
const usedWidth = prefixWidth + maxLabelWidth + visibleWidth(separator);
|
|
85
|
-
const valueMaxWidth = width - usedWidth - 2;
|
|
86
|
-
const valueText = this.theme.value(truncateToWidth(item.currentValue, valueMaxWidth, ""), isSelected);
|
|
87
|
-
lines.push(truncateToWidth(prefix + labelText + separator + valueText, width));
|
|
88
|
-
}
|
|
89
|
-
// Add scroll indicator if needed
|
|
90
|
-
if (startIndex > 0 || endIndex < displayItems.length) {
|
|
91
|
-
const scrollText = ` (${this.selectedIndex + 1}/${displayItems.length})`;
|
|
92
|
-
lines.push(this.theme.hint(truncateToWidth(scrollText, width - 2, "")));
|
|
93
|
-
}
|
|
94
|
-
// Add description for selected item
|
|
95
|
-
const selectedItem = displayItems[this.selectedIndex];
|
|
96
|
-
if (selectedItem?.description) {
|
|
97
|
-
lines.push("");
|
|
98
|
-
const wrappedDesc = wrapTextWithAnsi(selectedItem.description, width - 4);
|
|
99
|
-
for (const line of wrappedDesc) {
|
|
100
|
-
lines.push(this.theme.description(` ${line}`));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Add hint
|
|
104
|
-
this.addHintLine(lines, width);
|
|
105
|
-
return lines;
|
|
106
|
-
}
|
|
107
|
-
handleInput(data) {
|
|
108
|
-
// If submenu is active, delegate all input to it
|
|
109
|
-
// The submenu's onCancel (triggered by escape) will call done() which closes it
|
|
110
|
-
if (this.submenuComponent) {
|
|
111
|
-
this.submenuComponent.handleInput?.(data);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
// Main list input handling
|
|
115
|
-
const kb = getKeybindings();
|
|
116
|
-
const displayItems = this.searchEnabled ? this.filteredItems : this.items;
|
|
117
|
-
if (kb.matches(data, "tui.select.up")) {
|
|
118
|
-
if (displayItems.length === 0)
|
|
119
|
-
return;
|
|
120
|
-
this.selectedIndex = this.selectedIndex === 0 ? displayItems.length - 1 : this.selectedIndex - 1;
|
|
121
|
-
}
|
|
122
|
-
else if (kb.matches(data, "tui.select.down")) {
|
|
123
|
-
if (displayItems.length === 0)
|
|
124
|
-
return;
|
|
125
|
-
this.selectedIndex = this.selectedIndex === displayItems.length - 1 ? 0 : this.selectedIndex + 1;
|
|
126
|
-
}
|
|
127
|
-
else if (kb.matches(data, "tui.select.confirm") || data === " ") {
|
|
128
|
-
this.activateItem();
|
|
129
|
-
}
|
|
130
|
-
else if (kb.matches(data, "tui.select.cancel")) {
|
|
131
|
-
this.onCancel();
|
|
132
|
-
}
|
|
133
|
-
else if (this.searchEnabled && this.searchInput) {
|
|
134
|
-
const sanitized = data.replace(/ /g, "");
|
|
135
|
-
if (!sanitized) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
this.searchInput.handleInput(sanitized);
|
|
139
|
-
this.applyFilter(this.searchInput.getValue());
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
activateItem() {
|
|
143
|
-
const item = this.searchEnabled ? this.filteredItems[this.selectedIndex] : this.items[this.selectedIndex];
|
|
144
|
-
if (!item)
|
|
145
|
-
return;
|
|
146
|
-
if (item.submenu) {
|
|
147
|
-
// Open submenu, passing current value so it can pre-select correctly
|
|
148
|
-
this.submenuItemIndex = this.selectedIndex;
|
|
149
|
-
this.submenuComponent = item.submenu(item.currentValue, (selectedValue) => {
|
|
150
|
-
if (selectedValue !== undefined) {
|
|
151
|
-
item.currentValue = selectedValue;
|
|
152
|
-
this.onChange(item.id, selectedValue);
|
|
153
|
-
}
|
|
154
|
-
this.closeSubmenu();
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
else if (item.values && item.values.length > 0) {
|
|
158
|
-
// Cycle through values
|
|
159
|
-
const currentIndex = item.values.indexOf(item.currentValue);
|
|
160
|
-
const nextIndex = (currentIndex + 1) % item.values.length;
|
|
161
|
-
const newValue = item.values[nextIndex];
|
|
162
|
-
item.currentValue = newValue;
|
|
163
|
-
this.onChange(item.id, newValue);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
closeSubmenu() {
|
|
167
|
-
this.submenuComponent = null;
|
|
168
|
-
// Restore selection to the item that opened the submenu
|
|
169
|
-
if (this.submenuItemIndex !== null) {
|
|
170
|
-
this.selectedIndex = this.submenuItemIndex;
|
|
171
|
-
this.submenuItemIndex = null;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
applyFilter(query) {
|
|
175
|
-
this.filteredItems = fuzzyFilter(this.items, query, (item) => item.label);
|
|
176
|
-
this.selectedIndex = 0;
|
|
177
|
-
}
|
|
178
|
-
addHintLine(lines, width) {
|
|
179
|
-
lines.push("");
|
|
180
|
-
lines.push(truncateToWidth(this.theme.hint(this.searchEnabled
|
|
181
|
-
? " Type to search · Enter/Space to change · Esc to cancel"
|
|
182
|
-
: " Enter/Space to change · Esc to cancel"), width));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
//# sourceMappingURL=settings-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-list.js","sourceRoot":"","sources":["../../src/components/settings-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA6BnC,MAAM,OAAO,YAAY;IAChB,KAAK,CAAgB;IACrB,aAAa,CAAgB;IAC7B,KAAK,CAAoB;IACzB,aAAa,GAAG,CAAC,CAAC;IAClB,UAAU,CAAS;IACnB,QAAQ,CAAyC;IACjD,QAAQ,CAAa;IACrB,WAAW,CAAS;IACpB,aAAa,CAAU;IAE/B,gBAAgB;IACR,gBAAgB,GAAqB,IAAI,CAAC;IAC1C,gBAAgB,GAAkB,IAAI,CAAC;IAE/C,YACC,KAAoB,EACpB,UAAkB,EAClB,KAAwB,EACxB,QAAgD,EAChD,QAAoB,EACpB,OAAO,GAAwB,EAAE,EAChC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,IAAI,KAAK,CAAC;QACnD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK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A,CACD;IAEO,WAAW,CAAC,KAAa,EAAQ;QACxC,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;IAAA,CACvB;IAEO,WAAW,CAAC,KAAe,EAAE,KAAa,EAAQ;QACzD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CACT,eAAe,CACd,IAAI,CAAC,KAAK,CAAC,IAAI,CACd,IAAI,CAAC,aAAa;YACjB,CAAC,CAAC,4DAA0D;YAC5D,CAAC,CAAC,0CAAyC,CAC5C,EACD,KAAK,CACL,CACD,CAAC;IAAA,CACF;CACD","sourcesContent":["import { fuzzyFilter } from \"../fuzzy.ts\";\nimport { getKeybindings } from \"../keybindings.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\nimport { Input } from \"./input.ts\";\n\nexport interface SettingItem {\n\t/** Unique identifier for this setting */\n\tid: string;\n\t/** Display label (left side) */\n\tlabel: string;\n\t/** Optional description shown when selected */\n\tdescription?: string;\n\t/** Current value to display (right side) */\n\tcurrentValue: string;\n\t/** If provided, Enter/Space cycles through these values */\n\tvalues?: string[];\n\t/** If provided, Enter opens this submenu. Receives current value and done callback. */\n\tsubmenu?: (currentValue: string, done: (selectedValue?: string) => void) => Component;\n}\n\nexport interface SettingsListTheme {\n\tlabel: (text: string, selected: boolean) => string;\n\tvalue: (text: string, selected: boolean) => string;\n\tdescription: (text: string) => string;\n\tcursor: string;\n\thint: (text: string) => string;\n}\n\nexport interface SettingsListOptions {\n\tenableSearch?: boolean;\n}\n\nexport class SettingsList implements Component {\n\tprivate items: SettingItem[];\n\tprivate filteredItems: SettingItem[];\n\tprivate theme: SettingsListTheme;\n\tprivate selectedIndex = 0;\n\tprivate maxVisible: number;\n\tprivate onChange: (id: string, newValue: string) => void;\n\tprivate onCancel: () => void;\n\tprivate searchInput?: Input;\n\tprivate searchEnabled: boolean;\n\n\t// Submenu state\n\tprivate submenuComponent: Component | null = null;\n\tprivate submenuItemIndex: number | null = null;\n\n\tconstructor(\n\t\titems: SettingItem[],\n\t\tmaxVisible: number,\n\t\ttheme: SettingsListTheme,\n\t\tonChange: (id: string, newValue: string) => void,\n\t\tonCancel: () => void,\n\t\toptions: SettingsListOptions = {},\n\t) {\n\t\tthis.items = items;\n\t\tthis.filteredItems = items;\n\t\tthis.maxVisible = maxVisible;\n\t\tthis.theme = theme;\n\t\tthis.onChange = onChange;\n\t\tthis.onCancel = onCancel;\n\t\tthis.searchEnabled = options.enableSearch ?? false;\n\t\tif (this.searchEnabled) {\n\t\t\tthis.searchInput = new Input();\n\t\t}\n\t}\n\n\t/** Update an item's currentValue */\n\tupdateValue(id: string, newValue: string): void {\n\t\tconst item = this.items.find((i) => i.id === id);\n\t\tif (item) {\n\t\t\titem.currentValue = newValue;\n\t\t}\n\t}\n\n\tinvalidate(): void {\n\t\tthis.submenuComponent?.invalidate?.();\n\t}\n\n\trender(width: number): string[] {\n\t\t// If submenu is active, render it instead\n\t\tif (this.submenuComponent) {\n\t\t\treturn this.submenuComponent.render(width);\n\t\t}\n\n\t\treturn this.renderMainList(width);\n\t}\n\n\tprivate renderMainList(width: number): string[] {\n\t\tconst lines: string[] = [];\n\n\t\tif (this.searchEnabled && this.searchInput) {\n\t\t\tlines.push(...this.searchInput.render(width));\n\t\t\tlines.push(\"\");\n\t\t}\n\n\t\tif (this.items.length === 0) {\n\t\t\tlines.push(this.theme.hint(\" No settings available\"));\n\t\t\tif (this.searchEnabled) {\n\t\t\t\tthis.addHintLine(lines, width);\n\t\t\t}\n\t\t\treturn lines;\n\t\t}\n\n\t\tconst displayItems = this.searchEnabled ? this.filteredItems : this.items;\n\t\tif (displayItems.length === 0) {\n\t\t\tlines.push(truncateToWidth(this.theme.hint(\" No matching settings\"), width));\n\t\t\tthis.addHintLine(lines, width);\n\t\t\treturn lines;\n\t\t}\n\n\t\t// Calculate visible range with scrolling\n\t\tconst startIndex = Math.max(\n\t\t\t0,\n\t\t\tMath.min(this.selectedIndex - Math.floor(this.maxVisible / 2), displayItems.length - this.maxVisible),\n\t\t);\n\t\tconst endIndex = Math.min(startIndex + this.maxVisible, displayItems.length);\n\n\t\t// Calculate max label width for alignment\n\t\tconst maxLabelWidth = Math.min(30, Math.max(...this.items.map((item) => visibleWidth(item.label))));\n\n\t\t// Render visible items\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tconst item = displayItems[i];\n\t\t\tif (!item) continue;\n\n\t\t\tconst isSelected = i === this.selectedIndex;\n\t\t\tconst prefix = isSelected ? this.theme.cursor : \" \";\n\t\t\tconst prefixWidth = visibleWidth(prefix);\n\n\t\t\t// Pad label to align values\n\t\t\tconst labelPadded = item.label + \" \".repeat(Math.max(0, maxLabelWidth - visibleWidth(item.label)));\n\t\t\tconst labelText = this.theme.label(labelPadded, isSelected);\n\n\t\t\t// Calculate space for value\n\t\t\tconst separator = \" \";\n\t\t\tconst usedWidth = prefixWidth + maxLabelWidth + visibleWidth(separator);\n\t\t\tconst valueMaxWidth = width - usedWidth - 2;\n\n\t\t\tconst valueText = this.theme.value(truncateToWidth(item.currentValue, valueMaxWidth, \"\"), isSelected);\n\n\t\t\tlines.push(truncateToWidth(prefix + labelText + separator + valueText, width));\n\t\t}\n\n\t\t// Add scroll indicator if needed\n\t\tif (startIndex > 0 || endIndex < displayItems.length) {\n\t\t\tconst scrollText = ` (${this.selectedIndex + 1}/${displayItems.length})`;\n\t\t\tlines.push(this.theme.hint(truncateToWidth(scrollText, width - 2, \"\")));\n\t\t}\n\n\t\t// Add description for selected item\n\t\tconst selectedItem = displayItems[this.selectedIndex];\n\t\tif (selectedItem?.description) {\n\t\t\tlines.push(\"\");\n\t\t\tconst wrappedDesc = wrapTextWithAnsi(selectedItem.description, width - 4);\n\t\t\tfor (const line of wrappedDesc) {\n\t\t\t\tlines.push(this.theme.description(` ${line}`));\n\t\t\t}\n\t\t}\n\n\t\t// Add hint\n\t\tthis.addHintLine(lines, width);\n\n\t\treturn lines;\n\t}\n\n\thandleInput(data: string): void {\n\t\t// If submenu is active, delegate all input to it\n\t\t// The submenu's onCancel (triggered by escape) will call done() which closes it\n\t\tif (this.submenuComponent) {\n\t\t\tthis.submenuComponent.handleInput?.(data);\n\t\t\treturn;\n\t\t}\n\n\t\t// Main list input handling\n\t\tconst kb = getKeybindings();\n\t\tconst displayItems = this.searchEnabled ? this.filteredItems : this.items;\n\t\tif (kb.matches(data, \"tui.select.up\")) {\n\t\t\tif (displayItems.length === 0) return;\n\t\t\tthis.selectedIndex = this.selectedIndex === 0 ? displayItems.length - 1 : this.selectedIndex - 1;\n\t\t} else if (kb.matches(data, \"tui.select.down\")) {\n\t\t\tif (displayItems.length === 0) return;\n\t\t\tthis.selectedIndex = this.selectedIndex === displayItems.length - 1 ? 0 : this.selectedIndex + 1;\n\t\t} else if (kb.matches(data, \"tui.select.confirm\") || data === \" \") {\n\t\t\tthis.activateItem();\n\t\t} else if (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis.onCancel();\n\t\t} else if (this.searchEnabled && this.searchInput) {\n\t\t\tconst sanitized = data.replace(/ /g, \"\");\n\t\t\tif (!sanitized) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.searchInput.handleInput(sanitized);\n\t\t\tthis.applyFilter(this.searchInput.getValue());\n\t\t}\n\t}\n\n\tprivate activateItem(): void {\n\t\tconst item = this.searchEnabled ? this.filteredItems[this.selectedIndex] : this.items[this.selectedIndex];\n\t\tif (!item) return;\n\n\t\tif (item.submenu) {\n\t\t\t// Open submenu, passing current value so it can pre-select correctly\n\t\t\tthis.submenuItemIndex = this.selectedIndex;\n\t\t\tthis.submenuComponent = item.submenu(item.currentValue, (selectedValue?: string) => {\n\t\t\t\tif (selectedValue !== undefined) {\n\t\t\t\t\titem.currentValue = selectedValue;\n\t\t\t\t\tthis.onChange(item.id, selectedValue);\n\t\t\t\t}\n\t\t\t\tthis.closeSubmenu();\n\t\t\t});\n\t\t} else if (item.values && item.values.length > 0) {\n\t\t\t// Cycle through values\n\t\t\tconst currentIndex = item.values.indexOf(item.currentValue);\n\t\t\tconst nextIndex = (currentIndex + 1) % item.values.length;\n\t\t\tconst newValue = item.values[nextIndex];\n\t\t\titem.currentValue = newValue;\n\t\t\tthis.onChange(item.id, newValue);\n\t\t}\n\t}\n\n\tprivate closeSubmenu(): void {\n\t\tthis.submenuComponent = null;\n\t\t// Restore selection to the item that opened the submenu\n\t\tif (this.submenuItemIndex !== null) {\n\t\t\tthis.selectedIndex = this.submenuItemIndex;\n\t\t\tthis.submenuItemIndex = null;\n\t\t}\n\t}\n\n\tprivate applyFilter(query: string): void {\n\t\tthis.filteredItems = fuzzyFilter(this.items, query, (item) => item.label);\n\t\tthis.selectedIndex = 0;\n\t}\n\n\tprivate addHintLine(lines: string[], width: number): void {\n\t\tlines.push(\"\");\n\t\tlines.push(\n\t\t\ttruncateToWidth(\n\t\t\t\tthis.theme.hint(\n\t\t\t\t\tthis.searchEnabled\n\t\t\t\t\t\t? \" Type to search · Enter/Space to change · Esc to cancel\"\n\t\t\t\t\t\t: \" Enter/Space to change · Esc to cancel\",\n\t\t\t\t),\n\t\t\t\twidth,\n\t\t\t),\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Component } from "../tui.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Spacer component that renders empty lines
|
|
4
|
-
*/
|
|
5
|
-
export declare class Spacer implements Component {
|
|
6
|
-
private lines;
|
|
7
|
-
constructor(lines?: number);
|
|
8
|
-
setLines(lines: number): void;
|
|
9
|
-
invalidate(): void;
|
|
10
|
-
render(_width: number): string[];
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=spacer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacer.d.ts","sourceRoot":"","sources":["../../src/components/spacer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,qBAAa,MAAO,YAAW,SAAS;IACvC,OAAO,CAAC,KAAK,CAAS;IAEtB,YAAY,KAAK,GAAE,MAAU,EAE5B;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAE5B;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAM/B;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\n\n/**\n * Spacer component that renders empty lines\n */\nexport class Spacer implements Component {\n\tprivate lines: number;\n\n\tconstructor(lines: number = 1) {\n\t\tthis.lines = lines;\n\t}\n\n\tsetLines(lines: number): void {\n\t\tthis.lines = lines;\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(_width: number): string[] {\n\t\tconst result: string[] = [];\n\t\tfor (let i = 0; i < this.lines; i++) {\n\t\t\tresult.push(\"\");\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Spacer component that renders empty lines
|
|
3
|
-
*/
|
|
4
|
-
export class Spacer {
|
|
5
|
-
lines;
|
|
6
|
-
constructor(lines = 1) {
|
|
7
|
-
this.lines = lines;
|
|
8
|
-
}
|
|
9
|
-
setLines(lines) {
|
|
10
|
-
this.lines = lines;
|
|
11
|
-
}
|
|
12
|
-
invalidate() {
|
|
13
|
-
// No cached state to invalidate currently
|
|
14
|
-
}
|
|
15
|
-
render(_width) {
|
|
16
|
-
const result = [];
|
|
17
|
-
for (let i = 0; i < this.lines; i++) {
|
|
18
|
-
result.push("");
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=spacer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacer.js","sourceRoot":"","sources":["../../src/components/spacer.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,MAAM;IACV,KAAK,CAAS;IAEtB,YAAY,KAAK,GAAW,CAAC,EAAE;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAAA,CACnB;IAED,QAAQ,CAAC,KAAa,EAAQ;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAAA,CACnB;IAED,UAAU,GAAS;QAClB,0CAA0C;IADvB,CAEnB;IAED,MAAM,CAAC,MAAc,EAAY;QAChC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,MAAM,CAAC;IAAA,CACd;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\n\n/**\n * Spacer component that renders empty lines\n */\nexport class Spacer implements Component {\n\tprivate lines: number;\n\n\tconstructor(lines: number = 1) {\n\t\tthis.lines = lines;\n\t}\n\n\tsetLines(lines: number): void {\n\t\tthis.lines = lines;\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(_width: number): string[] {\n\t\tconst result: string[] = [];\n\t\tfor (let i = 0; i < this.lines; i++) {\n\t\t\tresult.push(\"\");\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Component } from "../tui.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Text component - displays multi-line text with word wrapping
|
|
4
|
-
*/
|
|
5
|
-
export declare class Text implements Component {
|
|
6
|
-
private text;
|
|
7
|
-
private paddingX;
|
|
8
|
-
private paddingY;
|
|
9
|
-
private customBgFn?;
|
|
10
|
-
private cachedText?;
|
|
11
|
-
private cachedWidth?;
|
|
12
|
-
private cachedLines?;
|
|
13
|
-
constructor(text?: string, paddingX?: number, paddingY?: number, customBgFn?: (text: string) => string);
|
|
14
|
-
setText(text: string): void;
|
|
15
|
-
setCustomBgFn(customBgFn?: (text: string) => string): void;
|
|
16
|
-
invalidate(): void;
|
|
17
|
-
render(width: number): string[];
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/components/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C;;GAEG;AACH,qBAAa,IAAK,YAAW,SAAS;IACrC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAC,CAA2B;IAG9C,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAW;IAE/B,YAAY,IAAI,GAAE,MAAW,EAAE,QAAQ,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAU,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAK/G;IAED,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAK1B;IAED,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAKzD;IAED,UAAU,IAAI,IAAI,CAIjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4D9B;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\nimport { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\n\n/**\n * Text component - displays multi-line text with word wrapping\n */\nexport class Text implements Component {\n\tprivate text: string;\n\tprivate paddingX: number; // Left/right padding\n\tprivate paddingY: number; // Top/bottom padding\n\tprivate customBgFn?: (text: string) => string;\n\n\t// Cache for rendered output\n\tprivate cachedText?: string;\n\tprivate cachedWidth?: number;\n\tprivate cachedLines?: string[];\n\n\tconstructor(text: string = \"\", paddingX: number = 1, paddingY: number = 1, customBgFn?: (text: string) => string) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t\tthis.customBgFn = customBgFn;\n\t}\n\n\tsetText(text: string): void {\n\t\tthis.text = text;\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\tsetCustomBgFn(customBgFn?: (text: string) => string): void {\n\t\tthis.customBgFn = customBgFn;\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\t// Check cache\n\t\tif (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\t// Don't render anything if there's no actual text\n\t\tif (!this.text || this.text.trim() === \"\") {\n\t\t\tconst result: string[] = [];\n\t\t\tthis.cachedText = this.text;\n\t\t\tthis.cachedWidth = width;\n\t\t\tthis.cachedLines = result;\n\t\t\treturn result;\n\t\t}\n\n\t\t// Replace tabs with 3 spaces\n\t\tconst normalizedText = this.text.replace(/\\t/g, \" \");\n\n\t\t// Calculate content width (subtract left/right margins)\n\t\tconst contentWidth = Math.max(1, width - this.paddingX * 2);\n\n\t\t// Wrap text (this preserves ANSI codes but does NOT pad)\n\t\tconst wrappedLines = wrapTextWithAnsi(normalizedText, contentWidth);\n\n\t\t// Add margins and background to each line\n\t\tconst leftMargin = \" \".repeat(this.paddingX);\n\t\tconst rightMargin = \" \".repeat(this.paddingX);\n\t\tconst contentLines: string[] = [];\n\n\t\tfor (const line of wrappedLines) {\n\t\t\t// Add margins\n\t\t\tconst lineWithMargins = leftMargin + line + rightMargin;\n\n\t\t\t// Apply background if specified (this also pads to full width)\n\t\t\tif (this.customBgFn) {\n\t\t\t\tcontentLines.push(applyBackgroundToLine(lineWithMargins, width, this.customBgFn));\n\t\t\t} else {\n\t\t\t\t// No background - just pad to width with spaces\n\t\t\t\tconst visibleLen = visibleWidth(lineWithMargins);\n\t\t\t\tconst paddingNeeded = Math.max(0, width - visibleLen);\n\t\t\t\tcontentLines.push(lineWithMargins + \" \".repeat(paddingNeeded));\n\t\t\t}\n\t\t}\n\n\t\t// Add top/bottom padding (empty lines)\n\t\tconst emptyLine = \" \".repeat(width);\n\t\tconst emptyLines: string[] = [];\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tconst line = this.customBgFn ? applyBackgroundToLine(emptyLine, width, this.customBgFn) : emptyLine;\n\t\t\temptyLines.push(line);\n\t\t}\n\n\t\tconst result = [...emptyLines, ...contentLines, ...emptyLines];\n\n\t\t// Update cache\n\t\tthis.cachedText = this.text;\n\t\tthis.cachedWidth = width;\n\t\tthis.cachedLines = result;\n\n\t\treturn result.length > 0 ? result : [\"\"];\n\t}\n}\n"]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from "../utils.js";
|
|
2
|
-
/**
|
|
3
|
-
* Text component - displays multi-line text with word wrapping
|
|
4
|
-
*/
|
|
5
|
-
export class Text {
|
|
6
|
-
text;
|
|
7
|
-
paddingX; // Left/right padding
|
|
8
|
-
paddingY; // Top/bottom padding
|
|
9
|
-
customBgFn;
|
|
10
|
-
// Cache for rendered output
|
|
11
|
-
cachedText;
|
|
12
|
-
cachedWidth;
|
|
13
|
-
cachedLines;
|
|
14
|
-
constructor(text = "", paddingX = 1, paddingY = 1, customBgFn) {
|
|
15
|
-
this.text = text;
|
|
16
|
-
this.paddingX = paddingX;
|
|
17
|
-
this.paddingY = paddingY;
|
|
18
|
-
this.customBgFn = customBgFn;
|
|
19
|
-
}
|
|
20
|
-
setText(text) {
|
|
21
|
-
this.text = text;
|
|
22
|
-
this.cachedText = undefined;
|
|
23
|
-
this.cachedWidth = undefined;
|
|
24
|
-
this.cachedLines = undefined;
|
|
25
|
-
}
|
|
26
|
-
setCustomBgFn(customBgFn) {
|
|
27
|
-
this.customBgFn = customBgFn;
|
|
28
|
-
this.cachedText = undefined;
|
|
29
|
-
this.cachedWidth = undefined;
|
|
30
|
-
this.cachedLines = undefined;
|
|
31
|
-
}
|
|
32
|
-
invalidate() {
|
|
33
|
-
this.cachedText = undefined;
|
|
34
|
-
this.cachedWidth = undefined;
|
|
35
|
-
this.cachedLines = undefined;
|
|
36
|
-
}
|
|
37
|
-
render(width) {
|
|
38
|
-
// Check cache
|
|
39
|
-
if (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {
|
|
40
|
-
return this.cachedLines;
|
|
41
|
-
}
|
|
42
|
-
// Don't render anything if there's no actual text
|
|
43
|
-
if (!this.text || this.text.trim() === "") {
|
|
44
|
-
const result = [];
|
|
45
|
-
this.cachedText = this.text;
|
|
46
|
-
this.cachedWidth = width;
|
|
47
|
-
this.cachedLines = result;
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
// Replace tabs with 3 spaces
|
|
51
|
-
const normalizedText = this.text.replace(/\t/g, " ");
|
|
52
|
-
// Calculate content width (subtract left/right margins)
|
|
53
|
-
const contentWidth = Math.max(1, width - this.paddingX * 2);
|
|
54
|
-
// Wrap text (this preserves ANSI codes but does NOT pad)
|
|
55
|
-
const wrappedLines = wrapTextWithAnsi(normalizedText, contentWidth);
|
|
56
|
-
// Add margins and background to each line
|
|
57
|
-
const leftMargin = " ".repeat(this.paddingX);
|
|
58
|
-
const rightMargin = " ".repeat(this.paddingX);
|
|
59
|
-
const contentLines = [];
|
|
60
|
-
for (const line of wrappedLines) {
|
|
61
|
-
// Add margins
|
|
62
|
-
const lineWithMargins = leftMargin + line + rightMargin;
|
|
63
|
-
// Apply background if specified (this also pads to full width)
|
|
64
|
-
if (this.customBgFn) {
|
|
65
|
-
contentLines.push(applyBackgroundToLine(lineWithMargins, width, this.customBgFn));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
// No background - just pad to width with spaces
|
|
69
|
-
const visibleLen = visibleWidth(lineWithMargins);
|
|
70
|
-
const paddingNeeded = Math.max(0, width - visibleLen);
|
|
71
|
-
contentLines.push(lineWithMargins + " ".repeat(paddingNeeded));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Add top/bottom padding (empty lines)
|
|
75
|
-
const emptyLine = " ".repeat(width);
|
|
76
|
-
const emptyLines = [];
|
|
77
|
-
for (let i = 0; i < this.paddingY; i++) {
|
|
78
|
-
const line = this.customBgFn ? applyBackgroundToLine(emptyLine, width, this.customBgFn) : emptyLine;
|
|
79
|
-
emptyLines.push(line);
|
|
80
|
-
}
|
|
81
|
-
const result = [...emptyLines, ...contentLines, ...emptyLines];
|
|
82
|
-
// Update cache
|
|
83
|
-
this.cachedText = this.text;
|
|
84
|
-
this.cachedWidth = width;
|
|
85
|
-
this.cachedLines = result;
|
|
86
|
-
return result.length > 0 ? result : [""];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/components/text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpF;;GAEG;AACH,MAAM,OAAO,IAAI;IACR,IAAI,CAAS;IACb,QAAQ,CAAS,CAAC,qBAAqB;IACvC,QAAQ,CAAS,CA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AAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,CAAC;gBACtD,YAAY,CAAC,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;YAChE,CAAC;QACF,CAAC;QAED,uCAAuC;QACvC,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACpG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAED,MAAM,MAAM,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,YAAY,EAAE,GAAG,UAAU,CAAC,CAAC;QAE/D,eAAe;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAE1B,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAAA,CACzC;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\nimport { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\n\n/**\n * Text component - displays multi-line text with word wrapping\n */\nexport class Text implements Component {\n\tprivate text: string;\n\tprivate paddingX: number; // Left/right padding\n\tprivate paddingY: number; // Top/bottom padding\n\tprivate customBgFn?: (text: string) => string;\n\n\t// Cache for rendered output\n\tprivate cachedText?: string;\n\tprivate cachedWidth?: number;\n\tprivate cachedLines?: string[];\n\n\tconstructor(text: string = \"\", paddingX: number = 1, paddingY: number = 1, customBgFn?: (text: string) => string) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t\tthis.customBgFn = customBgFn;\n\t}\n\n\tsetText(text: string): void {\n\t\tthis.text = text;\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\tsetCustomBgFn(customBgFn?: (text: string) => string): void {\n\t\tthis.customBgFn = customBgFn;\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\t// Check cache\n\t\tif (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\t// Don't render anything if there's no actual text\n\t\tif (!this.text || this.text.trim() === \"\") {\n\t\t\tconst result: string[] = [];\n\t\t\tthis.cachedText = this.text;\n\t\t\tthis.cachedWidth = width;\n\t\t\tthis.cachedLines = result;\n\t\t\treturn result;\n\t\t}\n\n\t\t// Replace tabs with 3 spaces\n\t\tconst normalizedText = this.text.replace(/\\t/g, \" \");\n\n\t\t// Calculate content width (subtract left/right margins)\n\t\tconst contentWidth = Math.max(1, width - this.paddingX * 2);\n\n\t\t// Wrap text (this preserves ANSI codes but does NOT pad)\n\t\tconst wrappedLines = wrapTextWithAnsi(normalizedText, contentWidth);\n\n\t\t// Add margins and background to each line\n\t\tconst leftMargin = \" \".repeat(this.paddingX);\n\t\tconst rightMargin = \" \".repeat(this.paddingX);\n\t\tconst contentLines: string[] = [];\n\n\t\tfor (const line of wrappedLines) {\n\t\t\t// Add margins\n\t\t\tconst lineWithMargins = leftMargin + line + rightMargin;\n\n\t\t\t// Apply background if specified (this also pads to full width)\n\t\t\tif (this.customBgFn) {\n\t\t\t\tcontentLines.push(applyBackgroundToLine(lineWithMargins, width, this.customBgFn));\n\t\t\t} else {\n\t\t\t\t// No background - just pad to width with spaces\n\t\t\t\tconst visibleLen = visibleWidth(lineWithMargins);\n\t\t\t\tconst paddingNeeded = Math.max(0, width - visibleLen);\n\t\t\t\tcontentLines.push(lineWithMargins + \" \".repeat(paddingNeeded));\n\t\t\t}\n\t\t}\n\n\t\t// Add top/bottom padding (empty lines)\n\t\tconst emptyLine = \" \".repeat(width);\n\t\tconst emptyLines: string[] = [];\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tconst line = this.customBgFn ? applyBackgroundToLine(emptyLine, width, this.customBgFn) : emptyLine;\n\t\t\temptyLines.push(line);\n\t\t}\n\n\t\tconst result = [...emptyLines, ...contentLines, ...emptyLines];\n\n\t\t// Update cache\n\t\tthis.cachedText = this.text;\n\t\tthis.cachedWidth = width;\n\t\tthis.cachedLines = result;\n\n\t\treturn result.length > 0 ? result : [\"\"];\n\t}\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Component } from "../tui.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Text component that truncates to fit viewport width
|
|
4
|
-
*/
|
|
5
|
-
export declare class TruncatedText implements Component {
|
|
6
|
-
private text;
|
|
7
|
-
private paddingX;
|
|
8
|
-
private paddingY;
|
|
9
|
-
constructor(text: string, paddingX?: number, paddingY?: number);
|
|
10
|
-
invalidate(): void;
|
|
11
|
-
render(width: number): string[];
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=truncated-text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"truncated-text.d.ts","sourceRoot":"","sources":["../../src/components/truncated-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C;;GAEG;AACH,qBAAa,aAAc,YAAW,SAAS;IAC9C,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IAEzB,YAAY,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAU,EAInE;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA0C9B;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth } from \"../utils.ts\";\n\n/**\n * Text component that truncates to fit viewport width\n */\nexport class TruncatedText implements Component {\n\tprivate text: string;\n\tprivate paddingX: number;\n\tprivate paddingY: number;\n\n\tconstructor(text: string, paddingX: number = 0, paddingY: number = 0) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(width: number): string[] {\n\t\tconst result: string[] = [];\n\n\t\t// Empty line padded to width\n\t\tconst emptyLine = \" \".repeat(width);\n\n\t\t// Add vertical padding above\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tresult.push(emptyLine);\n\t\t}\n\n\t\t// Calculate available width after horizontal padding\n\t\tconst availableWidth = Math.max(1, width - this.paddingX * 2);\n\n\t\t// Take only the first line (stop at newline)\n\t\tlet singleLineText = this.text;\n\t\tconst newlineIndex = this.text.indexOf(\"\\n\");\n\t\tif (newlineIndex !== -1) {\n\t\t\tsingleLineText = this.text.substring(0, newlineIndex);\n\t\t}\n\n\t\t// Truncate text if needed (accounting for ANSI codes)\n\t\tconst displayText = truncateToWidth(singleLineText, availableWidth);\n\n\t\t// Add horizontal padding\n\t\tconst leftPadding = \" \".repeat(this.paddingX);\n\t\tconst rightPadding = \" \".repeat(this.paddingX);\n\t\tconst lineWithPadding = leftPadding + displayText + rightPadding;\n\n\t\t// Pad line to exactly width characters\n\t\tconst lineVisibleWidth = visibleWidth(lineWithPadding);\n\t\tconst paddingNeeded = Math.max(0, width - lineVisibleWidth);\n\t\tconst finalLine = lineWithPadding + \" \".repeat(paddingNeeded);\n\n\t\tresult.push(finalLine);\n\n\t\t// Add vertical padding below\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tresult.push(emptyLine);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { truncateToWidth, visibleWidth } from "../utils.js";
|
|
2
|
-
/**
|
|
3
|
-
* Text component that truncates to fit viewport width
|
|
4
|
-
*/
|
|
5
|
-
export class TruncatedText {
|
|
6
|
-
text;
|
|
7
|
-
paddingX;
|
|
8
|
-
paddingY;
|
|
9
|
-
constructor(text, paddingX = 0, paddingY = 0) {
|
|
10
|
-
this.text = text;
|
|
11
|
-
this.paddingX = paddingX;
|
|
12
|
-
this.paddingY = paddingY;
|
|
13
|
-
}
|
|
14
|
-
invalidate() {
|
|
15
|
-
// No cached state to invalidate currently
|
|
16
|
-
}
|
|
17
|
-
render(width) {
|
|
18
|
-
const result = [];
|
|
19
|
-
// Empty line padded to width
|
|
20
|
-
const emptyLine = " ".repeat(width);
|
|
21
|
-
// Add vertical padding above
|
|
22
|
-
for (let i = 0; i < this.paddingY; i++) {
|
|
23
|
-
result.push(emptyLine);
|
|
24
|
-
}
|
|
25
|
-
// Calculate available width after horizontal padding
|
|
26
|
-
const availableWidth = Math.max(1, width - this.paddingX * 2);
|
|
27
|
-
// Take only the first line (stop at newline)
|
|
28
|
-
let singleLineText = this.text;
|
|
29
|
-
const newlineIndex = this.text.indexOf("\n");
|
|
30
|
-
if (newlineIndex !== -1) {
|
|
31
|
-
singleLineText = this.text.substring(0, newlineIndex);
|
|
32
|
-
}
|
|
33
|
-
// Truncate text if needed (accounting for ANSI codes)
|
|
34
|
-
const displayText = truncateToWidth(singleLineText, availableWidth);
|
|
35
|
-
// Add horizontal padding
|
|
36
|
-
const leftPadding = " ".repeat(this.paddingX);
|
|
37
|
-
const rightPadding = " ".repeat(this.paddingX);
|
|
38
|
-
const lineWithPadding = leftPadding + displayText + rightPadding;
|
|
39
|
-
// Pad line to exactly width characters
|
|
40
|
-
const lineVisibleWidth = visibleWidth(lineWithPadding);
|
|
41
|
-
const paddingNeeded = Math.max(0, width - lineVisibleWidth);
|
|
42
|
-
const finalLine = lineWithPadding + " ".repeat(paddingNeeded);
|
|
43
|
-
result.push(finalLine);
|
|
44
|
-
// Add vertical padding below
|
|
45
|
-
for (let i = 0; i < this.paddingY; i++) {
|
|
46
|
-
result.push(emptyLine);
|
|
47
|
-
}
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=truncated-text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"truncated-text.js","sourceRoot":"","sources":["../../src/components/truncated-text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D;;GAEG;AACH,MAAM,OAAO,aAAa;IACjB,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,QAAQ,CAAS;IAEzB,YAAY,IAAY,EAAE,QAAQ,GAAW,CAAC,EAAE,QAAQ,GAAW,CAAC,EAAE;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAAA,CACzB;IAED,UAAU,GAAS;QAClB,0CAA0C;IADvB,CAEnB;IAED,MAAM,CAAC,KAAa,EAAY;QAC/B,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,6BAA6B;QAC7B,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEpC,6BAA6B;QAC7B,KAAK,IAAI,CAAC,GAAG,CAA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AI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,MAAM,CAAC;IAAA,CACd;CACD","sourcesContent":["import type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth } from \"../utils.ts\";\n\n/**\n * Text component that truncates to fit viewport width\n */\nexport class TruncatedText implements Component {\n\tprivate text: string;\n\tprivate paddingX: number;\n\tprivate paddingY: number;\n\n\tconstructor(text: string, paddingX: number = 0, paddingY: number = 0) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(width: number): string[] {\n\t\tconst result: string[] = [];\n\n\t\t// Empty line padded to width\n\t\tconst emptyLine = \" \".repeat(width);\n\n\t\t// Add vertical padding above\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tresult.push(emptyLine);\n\t\t}\n\n\t\t// Calculate available width after horizontal padding\n\t\tconst availableWidth = Math.max(1, width - this.paddingX * 2);\n\n\t\t// Take only the first line (stop at newline)\n\t\tlet singleLineText = this.text;\n\t\tconst newlineIndex = this.text.indexOf(\"\\n\");\n\t\tif (newlineIndex !== -1) {\n\t\t\tsingleLineText = this.text.substring(0, newlineIndex);\n\t\t}\n\n\t\t// Truncate text if needed (accounting for ANSI codes)\n\t\tconst displayText = truncateToWidth(singleLineText, availableWidth);\n\n\t\t// Add horizontal padding\n\t\tconst leftPadding = \" \".repeat(this.paddingX);\n\t\tconst rightPadding = \" \".repeat(this.paddingX);\n\t\tconst lineWithPadding = leftPadding + displayText + rightPadding;\n\n\t\t// Pad line to exactly width characters\n\t\tconst lineVisibleWidth = visibleWidth(lineWithPadding);\n\t\tconst paddingNeeded = Math.max(0, width - lineVisibleWidth);\n\t\tconst finalLine = lineWithPadding + \" \".repeat(paddingNeeded);\n\n\t\tresult.push(finalLine);\n\n\t\t// Add vertical padding below\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tresult.push(emptyLine);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { AutocompleteProvider } from "./autocomplete.ts";
|
|
2
|
-
import type { Component } from "./tui.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Interface for custom editor components.
|
|
5
|
-
*
|
|
6
|
-
* This allows extensions to provide their own editor implementation
|
|
7
|
-
* (e.g., vim mode, emacs mode, custom keybindings) while maintaining
|
|
8
|
-
* compatibility with the core application.
|
|
9
|
-
*/
|
|
10
|
-
export interface EditorComponent extends Component {
|
|
11
|
-
/** Get the current text content */
|
|
12
|
-
getText(): string;
|
|
13
|
-
/** Set the text content */
|
|
14
|
-
setText(text: string): void;
|
|
15
|
-
/** Handle raw terminal input (key presses, paste sequences, etc.) */
|
|
16
|
-
handleInput(data: string): void;
|
|
17
|
-
/** Called when user submits (e.g., Enter key) */
|
|
18
|
-
onSubmit?: (text: string) => void;
|
|
19
|
-
/** Called when text changes */
|
|
20
|
-
onChange?: (text: string) => void;
|
|
21
|
-
/** Add text to history for up/down navigation */
|
|
22
|
-
addToHistory?(text: string): void;
|
|
23
|
-
/** Insert text at current cursor position */
|
|
24
|
-
insertTextAtCursor?(text: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Get text with any markers expanded (e.g., paste markers).
|
|
27
|
-
* Falls back to getText() if not implemented.
|
|
28
|
-
*/
|
|
29
|
-
getExpandedText?(): string;
|
|
30
|
-
/** Set the autocomplete provider */
|
|
31
|
-
setAutocompleteProvider?(provider: AutocompleteProvider): void;
|
|
32
|
-
/** Border color function */
|
|
33
|
-
borderColor?: (str: string) => string;
|
|
34
|
-
/** Set horizontal padding */
|
|
35
|
-
setPaddingX?(padding: number): void;
|
|
36
|
-
/** Set max visible items in autocomplete dropdown */
|
|
37
|
-
setAutocompleteMaxVisible?(maxVisible: number): void;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=editor-component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-component.d.ts","sourceRoot":"","sources":["../src/editor-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAKjD,mCAAmC;IACnC,OAAO,IAAI,MAAM,CAAC;IAElB,2BAA2B;IAC3B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,qEAAqE;IACrE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAMhC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAMlC,iDAAiD;IACjD,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAMlC,6CAA6C;IAC7C,kBAAkB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,eAAe,CAAC,IAAI,MAAM,CAAC;IAM3B,oCAAoC;IACpC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAM/D,4BAA4B;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAEtC,6BAA6B;IAC7B,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,qDAAqD;IACrD,yBAAyB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACrD","sourcesContent":["import type { AutocompleteProvider } from \"./autocomplete.ts\";\nimport type { Component } from \"./tui.ts\";\n\n/**\n * Interface for custom editor components.\n *\n * This allows extensions to provide their own editor implementation\n * (e.g., vim mode, emacs mode, custom keybindings) while maintaining\n * compatibility with the core application.\n */\nexport interface EditorComponent extends Component {\n\t// =========================================================================\n\t// Core text access (required)\n\t// =========================================================================\n\n\t/** Get the current text content */\n\tgetText(): string;\n\n\t/** Set the text content */\n\tsetText(text: string): void;\n\n\t/** Handle raw terminal input (key presses, paste sequences, etc.) */\n\thandleInput(data: string): void;\n\n\t// =========================================================================\n\t// Callbacks (required)\n\t// =========================================================================\n\n\t/** Called when user submits (e.g., Enter key) */\n\tonSubmit?: (text: string) => void;\n\n\t/** Called when text changes */\n\tonChange?: (text: string) => void;\n\n\t// =========================================================================\n\t// History support (optional)\n\t// =========================================================================\n\n\t/** Add text to history for up/down navigation */\n\taddToHistory?(text: string): void;\n\n\t// =========================================================================\n\t// Advanced text manipulation (optional)\n\t// =========================================================================\n\n\t/** Insert text at current cursor position */\n\tinsertTextAtCursor?(text: string): void;\n\n\t/**\n\t * Get text with any markers expanded (e.g., paste markers).\n\t * Falls back to getText() if not implemented.\n\t */\n\tgetExpandedText?(): string;\n\n\t// =========================================================================\n\t// Autocomplete support (optional)\n\t// =========================================================================\n\n\t/** Set the autocomplete provider */\n\tsetAutocompleteProvider?(provider: AutocompleteProvider): void;\n\n\t// =========================================================================\n\t// Appearance (optional)\n\t// =========================================================================\n\n\t/** Border color function */\n\tborderColor?: (str: string) => string;\n\n\t/** Set horizontal padding */\n\tsetPaddingX?(padding: number): void;\n\n\t/** Set max visible items in autocomplete dropdown */\n\tsetAutocompleteMaxVisible?(maxVisible: number): void;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-component.js","sourceRoot":"","sources":["../src/editor-component.ts"],"names":[],"mappings":"","sourcesContent":["import type { AutocompleteProvider } from \"./autocomplete.ts\";\nimport type { Component } from \"./tui.ts\";\n\n/**\n * Interface for custom editor components.\n *\n * This allows extensions to provide their own editor implementation\n * (e.g., vim mode, emacs mode, custom keybindings) while maintaining\n * compatibility with the core application.\n */\nexport interface EditorComponent extends Component {\n\t// =========================================================================\n\t// Core text access (required)\n\t// =========================================================================\n\n\t/** Get the current text content */\n\tgetText(): string;\n\n\t/** Set the text content */\n\tsetText(text: string): void;\n\n\t/** Handle raw terminal input (key presses, paste sequences, etc.) */\n\thandleInput(data: string): void;\n\n\t// =========================================================================\n\t// Callbacks (required)\n\t// =========================================================================\n\n\t/** Called when user submits (e.g., Enter key) */\n\tonSubmit?: (text: string) => void;\n\n\t/** Called when text changes */\n\tonChange?: (text: string) => void;\n\n\t// =========================================================================\n\t// History support (optional)\n\t// =========================================================================\n\n\t/** Add text to history for up/down navigation */\n\taddToHistory?(text: string): void;\n\n\t// =========================================================================\n\t// Advanced text manipulation (optional)\n\t// =========================================================================\n\n\t/** Insert text at current cursor position */\n\tinsertTextAtCursor?(text: string): void;\n\n\t/**\n\t * Get text with any markers expanded (e.g., paste markers).\n\t * Falls back to getText() if not implemented.\n\t */\n\tgetExpandedText?(): string;\n\n\t// =========================================================================\n\t// Autocomplete support (optional)\n\t// =========================================================================\n\n\t/** Set the autocomplete provider */\n\tsetAutocompleteProvider?(provider: AutocompleteProvider): void;\n\n\t// =========================================================================\n\t// Appearance (optional)\n\t// =========================================================================\n\n\t/** Border color function */\n\tborderColor?: (str: string) => string;\n\n\t/** Set horizontal padding */\n\tsetPaddingX?(padding: number): void;\n\n\t/** Set max visible items in autocomplete dropdown */\n\tsetAutocompleteMaxVisible?(maxVisible: number): void;\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fuzzy matching utilities.
|
|
3
|
-
* Matches if all query characters appear in order (not necessarily consecutive).
|
|
4
|
-
* Lower score = better match.
|
|
5
|
-
*/
|
|
6
|
-
export interface FuzzyMatch {
|
|
7
|
-
matches: boolean;
|
|
8
|
-
score: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function fuzzyMatch(query: string, text: string): FuzzyMatch;
|
|
11
|
-
/**
|
|
12
|
-
* Filter and sort items by fuzzy match quality (best matches first).
|
|
13
|
-
* Supports space-separated tokens: all tokens must match.
|
|
14
|
-
*/
|
|
15
|
-
export declare function fuzzyFilter<T>(items: T[], query: string, getText: (item: T) => string): T[];
|
|
16
|
-
//# sourceMappingURL=fuzzy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fuzzy.d.ts","sourceRoot":"","sources":["../src/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,UAAU;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAiFlE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,CAAC,EAAE,CAsC3F","sourcesContent":["/**\n * Fuzzy matching utilities.\n * Matches if all query characters appear in order (not necessarily consecutive).\n * Lower score = better match.\n */\n\nexport interface FuzzyMatch {\n\tmatches: boolean;\n\tscore: number;\n}\n\nexport function fuzzyMatch(query: string, text: string): FuzzyMatch {\n\tconst queryLower = query.toLowerCase();\n\tconst textLower = text.toLowerCase();\n\n\tconst matchQuery = (normalizedQuery: string): FuzzyMatch => {\n\t\tif (normalizedQuery.length === 0) {\n\t\t\treturn { matches: true, score: 0 };\n\t\t}\n\n\t\tif (normalizedQuery.length > textLower.length) {\n\t\t\treturn { matches: false, score: 0 };\n\t\t}\n\n\t\tlet queryIndex = 0;\n\t\tlet score = 0;\n\t\tlet lastMatchIndex = -1;\n\t\tlet consecutiveMatches = 0;\n\n\t\tfor (let i = 0; i < textLower.length && queryIndex < normalizedQuery.length; i++) {\n\t\t\tif (textLower[i] === normalizedQuery[queryIndex]) {\n\t\t\t\tconst isWordBoundary = i === 0 || /[\\s\\-_./:]/.test(textLower[i - 1]!);\n\n\t\t\t\t// Reward consecutive matches\n\t\t\t\tif (lastMatchIndex === i - 1) {\n\t\t\t\t\tconsecutiveMatches++;\n\t\t\t\t\tscore -= consecutiveMatches * 5;\n\t\t\t\t} else {\n\t\t\t\t\tconsecutiveMatches = 0;\n\t\t\t\t\t// Penalize gaps\n\t\t\t\t\tif (lastMatchIndex >= 0) {\n\t\t\t\t\t\tscore += (i - lastMatchIndex - 1) * 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Reward word boundary matches\n\t\t\t\tif (isWordBoundary) {\n\t\t\t\t\tscore -= 10;\n\t\t\t\t}\n\n\t\t\t\t// Slight penalty for later matches\n\t\t\t\tscore += i * 0.1;\n\n\t\t\t\tlastMatchIndex = i;\n\t\t\t\tqueryIndex++;\n\t\t\t}\n\t\t}\n\n\t\tif (queryIndex < normalizedQuery.length) {\n\t\t\treturn { matches: false, score: 0 };\n\t\t}\n\n\t\tif (normalizedQuery === textLower) {\n\t\t\tscore -= 100;\n\t\t}\n\n\t\treturn { matches: true, score };\n\t};\n\n\tconst primaryMatch = matchQuery(queryLower);\n\tif (primaryMatch.matches) {\n\t\treturn primaryMatch;\n\t}\n\n\tconst alphaNumericMatch = queryLower.match(/^(?<letters>[a-z]+)(?<digits>[0-9]+)$/);\n\tconst numericAlphaMatch = queryLower.match(/^(?<digits>[0-9]+)(?<letters>[a-z]+)$/);\n\tconst swappedQuery = alphaNumericMatch\n\t\t? `${alphaNumericMatch.groups?.digits ?? \"\"}${alphaNumericMatch.groups?.letters ?? \"\"}`\n\t\t: numericAlphaMatch\n\t\t\t? `${numericAlphaMatch.groups?.letters ?? \"\"}${numericAlphaMatch.groups?.digits ?? \"\"}`\n\t\t\t: \"\";\n\n\tif (!swappedQuery) {\n\t\treturn primaryMatch;\n\t}\n\n\tconst swappedMatch = matchQuery(swappedQuery);\n\tif (!swappedMatch.matches) {\n\t\treturn primaryMatch;\n\t}\n\n\treturn { matches: true, score: swappedMatch.score + 5 };\n}\n\n/**\n * Filter and sort items by fuzzy match quality (best matches first).\n * Supports space-separated tokens: all tokens must match.\n */\nexport function fuzzyFilter<T>(items: T[], query: string, getText: (item: T) => string): T[] {\n\tif (!query.trim()) {\n\t\treturn items;\n\t}\n\n\tconst tokens = query\n\t\t.trim()\n\t\t.split(/\\s+/)\n\t\t.filter((t) => t.length > 0);\n\n\tif (tokens.length === 0) {\n\t\treturn items;\n\t}\n\n\tconst results: { item: T; totalScore: number }[] = [];\n\n\tfor (const item of items) {\n\t\tconst text = getText(item);\n\t\tlet totalScore = 0;\n\t\tlet allMatch = true;\n\n\t\tfor (const token of tokens) {\n\t\t\tconst match = fuzzyMatch(token, text);\n\t\t\tif (match.matches) {\n\t\t\t\ttotalScore += match.score;\n\t\t\t} else {\n\t\t\t\tallMatch = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (allMatch) {\n\t\t\tresults.push({ item, totalScore });\n\t\t}\n\t}\n\n\tresults.sort((a, b) => a.totalScore - b.totalScore);\n\treturn results.map((r) => r.item);\n}\n"]}
|