paths.cjs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const path = require('node:path');
  2. function getUserDataPath(app) {
  3. return app.getPath('userData');
  4. }
  5. function getConfigFilePath(app) {
  6. return path.join(getUserDataPath(app), 'user_config.json');
  7. }
  8. function getWorkspaceDir(app) {
  9. return path.join(getUserDataPath(app), 'workspace');
  10. }
  11. function getTechnicalPlanFilePath(app) {
  12. return path.join(getWorkspaceDir(app), 'technical_plan.json');
  13. }
  14. function getDuplicateCheckFilePath(app) {
  15. return path.join(getWorkspaceDir(app), 'duplicate_check.json');
  16. }
  17. function getDuplicateCheckDir(app) {
  18. return path.join(getWorkspaceDir(app), 'duplicate-check');
  19. }
  20. function getGeneratedImagesDir(app) {
  21. return path.join(getWorkspaceDir(app), 'generated-images');
  22. }
  23. function getImportedImagesDir(app) {
  24. return path.join(getWorkspaceDir(app), 'imported-images');
  25. }
  26. function getKnowledgeBaseDir(app) {
  27. return path.join(getWorkspaceDir(app), 'knowledge-base');
  28. }
  29. function getAiLogsDir(app) {
  30. return path.join(getUserDataPath(app), 'logs', 'ai');
  31. }
  32. module.exports = {
  33. getAiLogsDir,
  34. getDuplicateCheckDir,
  35. getConfigFilePath,
  36. getDuplicateCheckFilePath,
  37. getGeneratedImagesDir,
  38. getImportedImagesDir,
  39. getKnowledgeBaseDir,
  40. getTechnicalPlanFilePath,
  41. getWorkspaceDir,
  42. getUserDataPath,
  43. };