Normalise tool IDs and fix file history to render IDs properly (#4470)

# Description of Changes
Normalise tool IDs and fix file history to render IDs properly
This commit is contained in:
James Brunton
2025-09-22 11:46:56 +01:00
committed by GitHub
parent 065bb46c1e
commit 9cbd1f7f0c
18 changed files with 181 additions and 148 deletions
@@ -9,6 +9,8 @@ import { extractErrorMessage } from '../../../utils/toolErrorHandler';
import { StirlingFile, extractFiles, FileId, StirlingFileStub, createStirlingFile, createNewStirlingFileStub } from '../../../types/fileContext';
import { ResponseHandler } from '../../../utils/toolResponseProcessor';
import { createChildStub, generateProcessedFileMetadata } from '../../../contexts/file/fileActions';
import { ToolOperation } from '../../../types/file';
import { ToolId } from '../../../types/toolId';
// Re-export for backwards compatibility
export type { ProcessingProgress, ResponseHandler };
@@ -29,7 +31,7 @@ export enum ToolType {
*/
interface BaseToolOperationConfig<TParams> {
/** Operation identifier for tracking and logging */
operationType: string;
operationType: ToolId;
/**
* Prefix added to processed filenames (e.g., 'compressed_', 'split_').
@@ -274,8 +276,8 @@ export const useToolOperation = <TParams>(
}
// Create new tool operation
const newToolOperation = {
toolName: config.operationType,
const newToolOperation: ToolOperation = {
toolId: config.operationType,
timestamp: Date.now()
};