Files
kidsai/node_modules/openai/pagination.mjs
rwiegand f893530471 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
2025-07-14 12:39:05 +02:00

66 lines
1.9 KiB
JavaScript

// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { AbstractPage } from "./core.mjs";
/**
* Note: no pagination actually occurs yet, this is for forwards-compatibility.
*/
export class Page extends AbstractPage {
constructor(client, response, body, options) {
super(client, response, body, options);
this.data = body.data || [];
this.object = body.object;
}
getPaginatedItems() {
return this.data ?? [];
}
// @deprecated Please use `nextPageInfo()` instead
/**
* This page represents a response that isn't actually paginated at the API level
* so there will never be any next page params.
*/
nextPageParams() {
return null;
}
nextPageInfo() {
return null;
}
}
export class CursorPage extends AbstractPage {
constructor(client, response, body, options) {
super(client, response, body, options);
this.data = body.data || [];
this.has_more = body.has_more || false;
}
getPaginatedItems() {
return this.data ?? [];
}
hasNextPage() {
if (this.has_more === false) {
return false;
}
return super.hasNextPage();
}
// @deprecated Please use `nextPageInfo()` instead
nextPageParams() {
const info = this.nextPageInfo();
if (!info)
return null;
if ('params' in info)
return info.params;
const params = Object.fromEntries(info.url.searchParams);
if (!Object.keys(params).length)
return null;
return params;
}
nextPageInfo() {
const data = this.getPaginatedItems();
if (!data.length) {
return null;
}
const id = data[data.length - 1]?.id;
if (!id) {
return null;
}
return { params: { after: id } };
}
}
//# sourceMappingURL=pagination.mjs.map