✅ 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:
36
node_modules/openai/internal/qs/stringify.mjs
generated
vendored
36
node_modules/openai/internal/qs/stringify.mjs
generated
vendored
@@ -1,6 +1,6 @@
|
||||
import { encode, is_buffer, maybe_map, has } from "./utils.mjs";
|
||||
import { default_format, default_formatter, formatters } from "./formats.mjs";
|
||||
import { isArray } from "../utils/values.mjs";
|
||||
import { encode, is_buffer, maybe_map } from "./utils.mjs";
|
||||
import { default_format, formatters } from "./formats.mjs";
|
||||
const has = Object.prototype.hasOwnProperty;
|
||||
const array_prefix_generators = {
|
||||
brackets(prefix) {
|
||||
return String(prefix) + '[]';
|
||||
@@ -13,10 +13,12 @@ const array_prefix_generators = {
|
||||
return String(prefix);
|
||||
},
|
||||
};
|
||||
const is_array = Array.isArray;
|
||||
const push = Array.prototype.push;
|
||||
const push_to_array = function (arr, value_or_array) {
|
||||
Array.prototype.push.apply(arr, isArray(value_or_array) ? value_or_array : [value_or_array]);
|
||||
push.apply(arr, is_array(value_or_array) ? value_or_array : [value_or_array]);
|
||||
};
|
||||
let toISOString;
|
||||
const to_ISO = Date.prototype.toISOString;
|
||||
const defaults = {
|
||||
addQueryPrefix: false,
|
||||
allowDots: false,
|
||||
@@ -30,11 +32,11 @@ const defaults = {
|
||||
encoder: encode,
|
||||
encodeValuesOnly: false,
|
||||
format: default_format,
|
||||
formatter: default_formatter,
|
||||
formatter: formatters[default_format],
|
||||
/** @deprecated */
|
||||
indices: false,
|
||||
serializeDate(date) {
|
||||
return (toISOString ?? (toISOString = Function.prototype.call.bind(Date.prototype.toISOString)))(date);
|
||||
return to_ISO.call(date);
|
||||
},
|
||||
skipNulls: false,
|
||||
strictNullHandling: false,
|
||||
@@ -74,7 +76,7 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
else if (obj instanceof Date) {
|
||||
obj = serializeDate?.(obj);
|
||||
}
|
||||
else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
||||
else if (generateArrayPrefix === 'comma' && is_array(obj)) {
|
||||
obj = maybe_map(obj, function (value) {
|
||||
if (value instanceof Date) {
|
||||
return serializeDate?.(value);
|
||||
@@ -110,7 +112,7 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
return values;
|
||||
}
|
||||
let obj_keys;
|
||||
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
||||
if (generateArrayPrefix === 'comma' && is_array(obj)) {
|
||||
// we need to join elements in
|
||||
if (encodeValuesOnly && encoder) {
|
||||
// @ts-expect-error values only
|
||||
@@ -118,7 +120,7 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
}
|
||||
obj_keys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
||||
}
|
||||
else if (isArray(filter)) {
|
||||
else if (is_array(filter)) {
|
||||
obj_keys = filter;
|
||||
}
|
||||
else {
|
||||
@@ -126,8 +128,8 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
obj_keys = sort ? keys.sort(sort) : keys;
|
||||
}
|
||||
const encoded_prefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
||||
const adjusted_prefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encoded_prefix + '[]' : encoded_prefix;
|
||||
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
||||
const adjusted_prefix = commaRoundTrip && is_array(obj) && obj.length === 1 ? encoded_prefix + '[]' : encoded_prefix;
|
||||
if (allowEmptyArrays && is_array(obj) && obj.length === 0) {
|
||||
return adjusted_prefix + '[]';
|
||||
}
|
||||
for (let j = 0; j < obj_keys.length; ++j) {
|
||||
@@ -140,7 +142,7 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
}
|
||||
// @ts-ignore
|
||||
const encoded_key = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
|
||||
const key_prefix = isArray(obj) ?
|
||||
const key_prefix = is_array(obj) ?
|
||||
typeof generateArrayPrefix === 'function' ?
|
||||
generateArrayPrefix(adjusted_prefix, encoded_key)
|
||||
: adjusted_prefix
|
||||
@@ -150,7 +152,7 @@ function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, al
|
||||
valueSideChannel.set(sentinel, sideChannel);
|
||||
push_to_array(values, inner_stringify(value, key_prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys,
|
||||
// @ts-ignore
|
||||
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
|
||||
generateArrayPrefix === 'comma' && encodeValuesOnly && is_array(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
|
||||
}
|
||||
return values;
|
||||
}
|
||||
@@ -170,14 +172,14 @@ function normalize_stringify_options(opts = defaults) {
|
||||
}
|
||||
let format = default_format;
|
||||
if (typeof opts.format !== 'undefined') {
|
||||
if (!has(formatters, opts.format)) {
|
||||
if (!has.call(formatters, opts.format)) {
|
||||
throw new TypeError('Unknown format option provided.');
|
||||
}
|
||||
format = opts.format;
|
||||
}
|
||||
const formatter = formatters[format];
|
||||
let filter = defaults.filter;
|
||||
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
||||
if (typeof opts.filter === 'function' || is_array(opts.filter)) {
|
||||
filter = opts.filter;
|
||||
}
|
||||
let arrayFormat;
|
||||
@@ -231,7 +233,7 @@ export function stringify(object, opts = {}) {
|
||||
filter = options.filter;
|
||||
obj = filter('', obj);
|
||||
}
|
||||
else if (isArray(options.filter)) {
|
||||
else if (is_array(options.filter)) {
|
||||
filter = options.filter;
|
||||
obj_keys = filter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user