✅ 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:
15
node_modules/openai/helpers/audio.js
generated
vendored
15
node_modules/openai/helpers/audio.js
generated
vendored
@@ -1,11 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.playAudio = playAudio;
|
||||
exports.recordAudio = recordAudio;
|
||||
exports.recordAudio = exports.playAudio = void 0;
|
||||
const formdata_node_1 = require("formdata-node");
|
||||
const node_child_process_1 = require("node:child_process");
|
||||
const node_stream_1 = require("node:stream");
|
||||
const node_process_1 = require("node:process");
|
||||
const uploads_1 = require("../internal/uploads.js");
|
||||
const DEFAULT_SAMPLE_RATE = 24000;
|
||||
const DEFAULT_CHANNELS = 1;
|
||||
const isNode = Boolean(node_process_1.versions?.node);
|
||||
@@ -26,8 +25,7 @@ function isResponse(stream) {
|
||||
return typeof stream.body !== 'undefined';
|
||||
}
|
||||
function isFile(stream) {
|
||||
(0, uploads_1.checkFileSupport)();
|
||||
return stream instanceof File;
|
||||
return stream instanceof formdata_node_1.File;
|
||||
}
|
||||
async function nodejsPlayAudio(stream) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -60,8 +58,8 @@ async function playAudio(input) {
|
||||
}
|
||||
throw new Error('Play audio is not supported in the browser yet. Check out https://npm.im/wavtools as an alternative.');
|
||||
}
|
||||
exports.playAudio = playAudio;
|
||||
function nodejsRecordAudio({ signal, device, timeout } = {}) {
|
||||
(0, uploads_1.checkFileSupport)();
|
||||
return new Promise((resolve, reject) => {
|
||||
const data = [];
|
||||
const provider = recordingProviders[node_process_1.platform];
|
||||
@@ -70,7 +68,7 @@ function nodejsRecordAudio({ signal, device, timeout } = {}) {
|
||||
'-f',
|
||||
provider,
|
||||
'-i',
|
||||
`:${device ?? 0}`, // default audio input device; adjust as needed
|
||||
`:${device ?? 0}`,
|
||||
'-ar',
|
||||
DEFAULT_SAMPLE_RATE.toString(),
|
||||
'-ac',
|
||||
@@ -93,7 +91,7 @@ function nodejsRecordAudio({ signal, device, timeout } = {}) {
|
||||
});
|
||||
function returnData() {
|
||||
const audioBuffer = Buffer.concat(data);
|
||||
const audioFile = new File([audioBuffer], 'audio.wav', { type: 'audio/wav' });
|
||||
const audioFile = new formdata_node_1.File([audioBuffer], 'audio.wav', { type: 'audio/wav' });
|
||||
resolve(audioFile);
|
||||
}
|
||||
if (typeof timeout === 'number' && timeout > 0) {
|
||||
@@ -119,4 +117,5 @@ async function recordAudio(options = {}) {
|
||||
}
|
||||
throw new Error('Record audio is not supported in the browser. Check out https://npm.im/wavtools as an alternative.');
|
||||
}
|
||||
exports.recordAudio = recordAudio;
|
||||
//# sourceMappingURL=audio.js.map
|
||||
Reference in New Issue
Block a user