✅ 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:
81
node_modules/openai/resources/vector-stores/files.mjs
generated
vendored
81
node_modules/openai/resources/vector-stores/files.mjs
generated
vendored
@@ -1,51 +1,47 @@
|
||||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
import { APIResource } from "../../core/resource.mjs";
|
||||
import { CursorPage, Page } from "../../core/pagination.mjs";
|
||||
import { buildHeaders } from "../../internal/headers.mjs";
|
||||
import { sleep } from "../../internal/utils.mjs";
|
||||
import { path } from "../../internal/utils/path.mjs";
|
||||
import { APIResource } from "../../resource.mjs";
|
||||
import { sleep, isRequestOptions } from "../../core.mjs";
|
||||
import { CursorPage, Page } from "../../pagination.mjs";
|
||||
export class Files extends APIResource {
|
||||
/**
|
||||
* Create a vector store file by attaching a
|
||||
* [File](https://platform.openai.com/docs/api-reference/files) to a
|
||||
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
|
||||
*/
|
||||
create(vectorStoreID, body, options) {
|
||||
return this._client.post(path `/vector_stores/${vectorStoreID}/files`, {
|
||||
create(vectorStoreId, body, options) {
|
||||
return this._client.post(`/vector_stores/${vectorStoreId}/files`, {
|
||||
body,
|
||||
...options,
|
||||
headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves a vector store file.
|
||||
*/
|
||||
retrieve(fileID, params, options) {
|
||||
const { vector_store_id } = params;
|
||||
return this._client.get(path `/vector_stores/${vector_store_id}/files/${fileID}`, {
|
||||
retrieve(vectorStoreId, fileId, options) {
|
||||
return this._client.get(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
|
||||
...options,
|
||||
headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update attributes on a vector store file.
|
||||
*/
|
||||
update(fileID, params, options) {
|
||||
const { vector_store_id, ...body } = params;
|
||||
return this._client.post(path `/vector_stores/${vector_store_id}/files/${fileID}`, {
|
||||
update(vectorStoreId, fileId, body, options) {
|
||||
return this._client.post(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
|
||||
body,
|
||||
...options,
|
||||
headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns a list of vector store files.
|
||||
*/
|
||||
list(vectorStoreID, query = {}, options) {
|
||||
return this._client.getAPIList(path `/vector_stores/${vectorStoreID}/files`, (CursorPage), {
|
||||
list(vectorStoreId, query = {}, options) {
|
||||
if (isRequestOptions(query)) {
|
||||
return this.list(vectorStoreId, {}, query);
|
||||
}
|
||||
return this._client.getAPIList(`/vector_stores/${vectorStoreId}/files`, VectorStoreFilesPage, {
|
||||
query,
|
||||
...options,
|
||||
headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
@@ -54,11 +50,10 @@ export class Files extends APIResource {
|
||||
* [delete file](https://platform.openai.com/docs/api-reference/files/delete)
|
||||
* endpoint.
|
||||
*/
|
||||
delete(fileID, params, options) {
|
||||
const { vector_store_id } = params;
|
||||
return this._client.delete(path `/vector_stores/${vector_store_id}/files/${fileID}`, {
|
||||
del(vectorStoreId, fileId, options) {
|
||||
return this._client.delete(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
|
||||
...options,
|
||||
headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
|
||||
headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
|
||||
});
|
||||
}
|
||||
/**
|
||||
@@ -74,18 +69,16 @@ export class Files extends APIResource {
|
||||
* Note: this will return even if the file failed to process, you need to check
|
||||
* file.last_error and file.status to handle these cases
|
||||
*/
|
||||
async poll(vectorStoreID, fileID, options) {
|
||||
const headers = buildHeaders([
|
||||
options?.headers,
|
||||
{
|
||||
'X-Stainless-Poll-Helper': 'true',
|
||||
'X-Stainless-Custom-Poll-Interval': options?.pollIntervalMs?.toString() ?? undefined,
|
||||
},
|
||||
]);
|
||||
async poll(vectorStoreId, fileId, 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 fileResponse = await this.retrieve(fileID, {
|
||||
vector_store_id: vectorStoreID,
|
||||
}, { ...options, headers }).withResponse();
|
||||
const fileResponse = await this.retrieve(vectorStoreId, fileId, {
|
||||
...options,
|
||||
headers,
|
||||
}).withResponse();
|
||||
const file = fileResponse.data;
|
||||
switch (file.status) {
|
||||
case 'in_progress':
|
||||
@@ -130,9 +123,17 @@ export class Files extends APIResource {
|
||||
/**
|
||||
* Retrieve the parsed contents of a vector store file.
|
||||
*/
|
||||
content(fileID, params, options) {
|
||||
const { vector_store_id } = params;
|
||||
return this._client.getAPIList(path `/vector_stores/${vector_store_id}/files/${fileID}/content`, (Page), { ...options, headers: buildHeaders([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]) });
|
||||
content(vectorStoreId, fileId, options) {
|
||||
return this._client.getAPIList(`/vector_stores/${vectorStoreId}/files/${fileId}/content`, FileContentResponsesPage, { ...options, headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers } });
|
||||
}
|
||||
}
|
||||
export class VectorStoreFilesPage extends CursorPage {
|
||||
}
|
||||
/**
|
||||
* Note: no pagination actually occurs yet, this is for forwards-compatibility.
|
||||
*/
|
||||
export class FileContentResponsesPage extends Page {
|
||||
}
|
||||
Files.VectorStoreFilesPage = VectorStoreFilesPage;
|
||||
Files.FileContentResponsesPage = FileContentResponsesPage;
|
||||
//# sourceMappingURL=files.mjs.map
|
||||
Reference in New Issue
Block a user