Skip to content

Commit 6c981d9

Browse files
committed
fix(frontend): stabilize local PII guard verification
1 parent 394ad24 commit 6c981d9

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

frontend/src/composables/useQueryInterfaceController.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export function useQueryInterfaceController({ getContext, service, logService })
229229
});
230230

231231
if (useTextProcessMode) {
232-
const textProcessData = {
232+
const textProcessPayload = {
233233
text: currentQuery,
234234
extractionBackend: latestState.textProcessOptions.extractionBackend,
235235
llmModel: latestState.textProcessOptions.llmModel,
@@ -253,10 +253,10 @@ export function useQueryInterfaceController({ getContext, service, logService })
253253
topTermPerChunkForAggregation: latestState.topTermPerChunkForAggregation,
254254
includeDetails: latestState.includeDetails,
255255
};
256-
logService.info('Sending to /text/process API', sanitizedLog);
257-
response = await service.processText(textProcessData);
256+
logService.info('Submitting text request', sanitizedLog);
257+
response = await service.processText(textProcessPayload);
258258
} else {
259-
const queryData = {
259+
const queryPayload = {
260260
text: currentQuery,
261261
model_name: latestState.selectedModel,
262262
language: latestState.selectedLanguage,
@@ -266,8 +266,8 @@ export function useQueryInterfaceController({ getContext, service, logService })
266266
detect_query_assertion: true,
267267
include_details: latestState.includeDetails,
268268
};
269-
logService.info('Sending to /query API', sanitizedLog);
270-
response = await service.queryHpo(queryData);
269+
logService.info('Submitting text request', sanitizedLog);
270+
response = await service.queryHpo(queryPayload);
271271
}
272272

273273
context.conversationStore.updateQueryResponse(queryId, response);

frontend/src/services/PhentrieveService.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ const getSerializedSize = value => JSON.stringify(value)?.length || 0;
1717
const GENERIC_API_DETAIL = 'API returned an error. See status code for details.';
1818

1919
class PhentrieveService {
20-
async queryHpo(queryData) {
21-
// queryData should match QueryRequest schema from FastAPI
20+
async queryHpo(queryPayload) {
21+
// Payload should match QueryRequest schema from FastAPI
2222
// Example: { text: "...", model_name: "...", num_results: 10, ... }
2323
try {
2424
logService.info('Querying HPO API', {
25-
textLength: queryData.text?.length || 0,
26-
numResults: queryData.num_results ?? queryData.numResults,
27-
model: queryData.model_name ?? queryData.modelName,
25+
textLength: queryPayload.text?.length || 0,
26+
numResults: queryPayload.num_results ?? queryPayload.numResults,
27+
model: queryPayload.model_name ?? queryPayload.modelName,
2828
});
29-
const response = await axios.post(`${API_URL}/query/`, queryData, RESEARCH_USE_ACK_CONFIG);
29+
const response = await axios.post(`${API_URL}/query/`, queryPayload, RESEARCH_USE_ACK_CONFIG);
3030
logService.debug('HPO API response received', {
3131
status: response.status,
3232
dataSize: getSerializedSize(response.data),

0 commit comments

Comments
 (0)