mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
- Replaced console.log and console.error statements with logger methods from @automaker/utils in various UI components, ensuring consistent log formatting and improved readability. - Enhanced error handling by utilizing logger methods to provide clearer context for issues encountered during operations. - Updated multiple views and hooks to integrate the new logging system, improving maintainability and debugging capabilities. This update significantly enhances the observability of UI components, facilitating easier troubleshooting and monitoring.
68 lines
1.3 KiB
TypeScript
68 lines
1.3 KiB
TypeScript
/**
|
|
* @automaker/utils
|
|
* Shared utility functions for AutoMaker
|
|
*/
|
|
|
|
// Error handling
|
|
export {
|
|
isAbortError,
|
|
isCancellationError,
|
|
isAuthenticationError,
|
|
isRateLimitError,
|
|
isQuotaExhaustedError,
|
|
extractRetryAfter,
|
|
classifyError,
|
|
getUserFriendlyErrorMessage,
|
|
getErrorMessage,
|
|
} from './error-handler.js';
|
|
|
|
// Conversation utilities
|
|
export {
|
|
extractTextFromContent,
|
|
normalizeContentBlocks,
|
|
formatHistoryAsText,
|
|
convertHistoryToMessages,
|
|
} from './conversation-utils.js';
|
|
|
|
// Image handling
|
|
export {
|
|
getMimeTypeForImage,
|
|
readImageAsBase64,
|
|
convertImagesToContentBlocks,
|
|
formatImagePathsForPrompt,
|
|
} from './image-handler.js';
|
|
|
|
// Prompt building
|
|
export {
|
|
buildPromptWithImages,
|
|
type PromptContent,
|
|
type PromptWithImages,
|
|
} from './prompt-builder.js';
|
|
|
|
// Logger
|
|
export {
|
|
createLogger,
|
|
getLogLevel,
|
|
setLogLevel,
|
|
setColorsEnabled,
|
|
setTimestampsEnabled,
|
|
LogLevel,
|
|
type Logger,
|
|
} from './logger.js';
|
|
|
|
// File system utilities
|
|
export { mkdirSafe, existsSafe } from './fs-utils.js';
|
|
|
|
// Path utilities
|
|
export { normalizePath, pathsEqual } from './path-utils.js';
|
|
|
|
// Context file loading
|
|
export {
|
|
loadContextFiles,
|
|
getContextFilesSummary,
|
|
type ContextMetadata,
|
|
type ContextFileInfo,
|
|
type ContextFilesResult,
|
|
type LoadContextFilesOptions,
|
|
} from './context-loader.js';
|