fix: Update local scripts tab to scan /scripts/ct directory
- Add getCtScripts() method to ScriptManager to scan ct subdirectory - Add getCtScripts tRPC endpoint for local scripts tab - Update ScriptsList component to use getCtScripts instead of getScripts - Fix script path construction to use relative paths for terminal - Local scripts tab now correctly shows scripts from /scripts/ct folder
This commit is contained in:
@@ -17,6 +17,16 @@ export const scriptsRouter = createTRPCRouter({
|
||||
};
|
||||
}),
|
||||
|
||||
// Get CT scripts (for local scripts tab)
|
||||
getCtScripts: publicProcedure
|
||||
.query(async () => {
|
||||
const scripts = await scriptManager.getCtScripts();
|
||||
return {
|
||||
scripts,
|
||||
directoryInfo: scriptManager.getScriptsDirectoryInfo()
|
||||
};
|
||||
}),
|
||||
|
||||
// Get repository status
|
||||
getRepoStatus: publicProcedure
|
||||
.query(async () => {
|
||||
|
||||
Reference in New Issue
Block a user