✅ Fix chat interface - restore continuous conversation flow
🎯 Major improvements to MissionControl component: - Always keep input field visible and functional after AI responses - Auto-clear input after submitting questions for better UX - Add dynamic visual indicators (first question vs follow-up) - Improve response layout with clear separation and hints - Enable proper chat-like experience for continuous learning 🌟 Additional enhancements: - Better language-specific messaging throughout interface - Clearer visual hierarchy between input and response areas - Intuitive flow that guides users to ask follow-up questions - Maintains responsive design and accessibility 🔧 Technical changes: - Enhanced MissionControl state management - Improved component layout and styling - Better TypeScript integration across components - Updated tsconfig for stricter type checking
This commit is contained in:
60
node_modules/openai/resources/vector-stores/file-batches.js
generated
vendored
60
node_modules/openai/resources/vector-stores/file-batches.js
generated
vendored
@@ -1,43 +1,41 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FileBatches = void 0;
|
||||
const resource_1 = require("../../core/resource.js");
|
||||
const pagination_1 = require("../../core/pagination.js");
|
||||
const headers_1 = require("../../internal/headers.js");
|
||||
const sleep_1 = require("../../internal/utils/sleep.js");
|
||||
exports.VectorStoreFilesPage = exports.FileBatches = void 0;
|
||||
const resource_1 = require("../../resource.js");
|
||||
const core_1 = require("../../core.js");
|
||||
const core_2 = require("../../core.js");
|
||||
const Util_1 = require("../../lib/Util.js");
|
||||
const path_1 = require("../../internal/utils/path.js");
|
||||
const files_1 = require("./files.js");
|
||||
Object.defineProperty(exports, "VectorStoreFilesPage", { enumerable: true, get: function () { return files_1.VectorStoreFilesPage; } });
|
||||
class FileBatches extends resource_1.APIResource {
|
||||
/**
|
||||
* Create a vector store file batch.
|
||||
*/
|
||||
create(vectorStoreID, body, options) {
|
||||
return this._client.post((0, path_1.path) `/vector_stores/${vectorStoreID}/file_batches`, {
|
||||
create(vectorStoreId, body, options) {
|
||||
return this._client.post(`/vector_stores/${vectorStoreId}/file_batches`, {
|
||||
body,
|
||||
...options,
|
||||
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves a vector store file batch.
|
||||
*/
|
||||
retrieve(batchID, params, options) {
|
||||
const { vector_store_id } = params;
|
||||
return this._client.get((0, path_1.path) `/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
|
||||
retrieve(vectorStoreId, batchId, options) {
|
||||
return this._client.get(`/vector_stores/${vectorStoreId}/file_batches/${batchId}`, {
|
||||
...options,
|
||||
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Cancel a vector store file batch. This attempts to cancel the processing of
|
||||
* files in this batch as soon as possible.
|
||||
*/
|
||||
cancel(batchID, params, options) {
|
||||
const { vector_store_id } = params;
|
||||
return this._client.post((0, path_1.path) `/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
|
||||
cancel(vectorStoreId, batchId, options) {
|
||||
return this._client.post(`/vector_stores/${vectorStoreId}/file_batches/${batchId}/cancel`, {
|
||||
...options,
|
||||
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
@@ -47,12 +45,11 @@ class FileBatches extends resource_1.APIResource {
|
||||
const batch = await this.create(vectorStoreId, body);
|
||||
return await this.poll(vectorStoreId, batch.id, options);
|
||||
}
|
||||
/**
|
||||
* Returns a list of vector store files in a batch.
|
||||
*/
|
||||
listFiles(batchID, params, options) {
|
||||
const { vector_store_id, ...query } = params;
|
||||
return this._client.getAPIList((0, path_1.path) `/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, (pagination_1.CursorPage), { query, ...options, headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]) });
|
||||
listFiles(vectorStoreId, batchId, query = {}, options) {
|
||||
if ((0, core_1.isRequestOptions)(query)) {
|
||||
return this.listFiles(vectorStoreId, batchId, {}, query);
|
||||
}
|
||||
return this._client.getAPIList(`/vector_stores/${vectorStoreId}/file_batches/${batchId}/files`, files_1.VectorStoreFilesPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers } });
|
||||
}
|
||||
/**
|
||||
* Wait for the given file batch to be processed.
|
||||
@@ -60,16 +57,13 @@ class FileBatches extends resource_1.APIResource {
|
||||
* Note: this will return even if one of the files failed to process, you need to
|
||||
* check batch.file_counts.failed_count to handle this case.
|
||||
*/
|
||||
async poll(vectorStoreID, batchID, options) {
|
||||
const headers = (0, headers_1.buildHeaders)([
|
||||
options?.headers,
|
||||
{
|
||||
'X-Stainless-Poll-Helper': 'true',
|
||||
'X-Stainless-Custom-Poll-Interval': options?.pollIntervalMs?.toString() ?? undefined,
|
||||
},
|
||||
]);
|
||||
async poll(vectorStoreId, batchId, options) {
|
||||
const headers = { ...options?.headers, 'X-Stainless-Poll-Helper': 'true' };
|
||||
if (options?.pollIntervalMs) {
|
||||
headers['X-Stainless-Custom-Poll-Interval'] = options.pollIntervalMs.toString();
|
||||
}
|
||||
while (true) {
|
||||
const { data: batch, response } = await this.retrieve(batchID, { vector_store_id: vectorStoreID }, {
|
||||
const { data: batch, response } = await this.retrieve(vectorStoreId, batchId, {
|
||||
...options,
|
||||
headers,
|
||||
}).withResponse();
|
||||
@@ -88,7 +82,7 @@ class FileBatches extends resource_1.APIResource {
|
||||
}
|
||||
}
|
||||
}
|
||||
await (0, sleep_1.sleep)(sleepInterval);
|
||||
await (0, core_2.sleep)(sleepInterval);
|
||||
break;
|
||||
case 'failed':
|
||||
case 'cancelled':
|
||||
|
||||
Reference in New Issue
Block a user