Scheduled research persona generation

This commit is contained in:
ajaysi
2025-11-05 08:51:00 +05:30
parent 55087c4f37
commit d99c7c83a7
98 changed files with 14518 additions and 828 deletions

View File

@@ -16,8 +16,8 @@ import {
UsageStatsSchema,
} from '../types/billing';
// API base configuration
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:8000';
// API base configuration - consistent with client.ts pattern
const API_BASE_URL = process.env.REACT_APP_API_URL || process.env.REACT_APP_BACKEND_URL || '';
// Create axios instance with default config
const billingAPI = axios.create({

View File

@@ -308,9 +308,7 @@ export const blogWriterApi = {
},
async pollResearchStatus(taskId: string): Promise<TaskStatusResponse> {
console.log('Polling research status for task:', taskId);
const { data } = await pollingApiClient.get(`/api/blog/research/status/${taskId}`);
console.log('Research status response:', data);
return data;
},

View File

@@ -77,8 +77,8 @@ class HallucinationDetectorService {
private baseUrl: string;
constructor() {
// Use environment variable or default to localhost
this.baseUrl = process.env.REACT_APP_API_URL || 'http://localhost:8000';
// Consistent API URL pattern - no hardcoded localhost fallback
this.baseUrl = process.env.REACT_APP_API_URL || process.env.REACT_APP_BACKEND_URL || '';
}
/**

View File

@@ -15,8 +15,8 @@ import {
CacheStatsSchema,
} from '../types/monitoring';
// API base configuration
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:8000';
// API base configuration - consistent with client.ts pattern
const API_BASE_URL = process.env.REACT_APP_API_URL || process.env.REACT_APP_BACKEND_URL || '';
// Create axios instance for monitoring APIs
const monitoringAPI = axios.create({

View File

@@ -12,7 +12,8 @@ import {
CopilotSuggestion
} from '../types/seoCopilotTypes';
const API_BASE_URL = process.env.REACT_APP_API_BASE_URL || 'http://localhost:8000';
// Consistent API URL pattern - use same env vars as other services
const API_BASE_URL = process.env.REACT_APP_API_URL || process.env.REACT_APP_BACKEND_URL || '';
class SEOApiService {
private baseUrl: string;

View File

@@ -21,7 +21,8 @@ export interface WASuggestResponse {
class WritingAssistantService {
private baseUrl: string;
constructor() {
this.baseUrl = process.env.REACT_APP_API_URL || 'http://localhost:8000';
// Consistent API URL pattern - no hardcoded localhost fallback
this.baseUrl = process.env.REACT_APP_API_URL || process.env.REACT_APP_BACKEND_URL || '';
}
async suggest(text: string): Promise<WASuggestion[]> {