@hachej/boring-agent 0.1.94 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-N4AATPH7.js → chunk-2EMAKBVR.js} +17 -2
- package/dist/front/index.d.ts +3 -1
- package/dist/front/index.js +402 -353
- package/dist/front/styles.css +83 -64
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -1
- package/dist/server/worker/index.js +1 -1
- package/package.json +4 -4
|
@@ -4077,12 +4077,22 @@ var HarnessPiChatService = class {
|
|
|
4077
4077
|
}
|
|
4078
4078
|
async readStateBeforeDispose(ctx, sessionId) {
|
|
4079
4079
|
const sessionKey2 = this.sessionKey(ctx, sessionId);
|
|
4080
|
-
|
|
4080
|
+
let channel = this.channels.get(sessionKey2);
|
|
4081
4081
|
if (!channel && !this.harnessMayHaveLiveSession(ctx, sessionId)) {
|
|
4082
4082
|
const persisted = await this.readPersistedState(ctx, sessionId);
|
|
4083
|
-
|
|
4083
|
+
channel = this.channels.get(sessionKey2);
|
|
4084
|
+
if (persisted && !channel && !this.harnessMayHaveLiveSession(ctx, sessionId)) return persisted;
|
|
4084
4085
|
}
|
|
4085
4086
|
const adapter = await this.getAdapter(ctx, sessionId, "");
|
|
4087
|
+
if (this.canRefreshFromPersistedState(sessionKey2, adapter)) {
|
|
4088
|
+
const persisted = await this.readPersistedState(ctx, sessionId);
|
|
4089
|
+
if (persisted && this.canRefreshFromPersistedState(sessionKey2, adapter)) {
|
|
4090
|
+
return this.enrichSyntheticPromptFailures(
|
|
4091
|
+
sessionKey2,
|
|
4092
|
+
this.messageMetadata.enrichSnapshot(sessionKey2, persisted)
|
|
4093
|
+
);
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4086
4096
|
const snapshot = this.messageMetadata.enrichSnapshot(sessionKey2, buildPiChatSnapshot(adapter, {
|
|
4087
4097
|
seq: channel?.buffer.latestSeq ?? 0,
|
|
4088
4098
|
sessionId,
|
|
@@ -4091,6 +4101,11 @@ var HarnessPiChatService = class {
|
|
|
4091
4101
|
}));
|
|
4092
4102
|
return this.enrichSyntheticPromptFailures(sessionKey2, snapshot);
|
|
4093
4103
|
}
|
|
4104
|
+
canRefreshFromPersistedState(sessionKey2, adapter) {
|
|
4105
|
+
if (this.activePromptRuns.has(sessionKey2)) return false;
|
|
4106
|
+
const snapshot = adapter.readSnapshot();
|
|
4107
|
+
return !snapshot.isStreaming && !snapshot.isRetrying && snapshot.pendingMessageCount === 0 && snapshot.steeringMessages.length === 0 && snapshot.followUpMessages.length === 0;
|
|
4108
|
+
}
|
|
4094
4109
|
harnessMayHaveLiveSession(ctx, sessionId) {
|
|
4095
4110
|
return typeof this.harness.hasPiSession === "function" ? this.harness.hasPiSession(sessionId, toSessionCtx(ctx)) : true;
|
|
4096
4111
|
}
|
package/dist/front/index.d.ts
CHANGED
|
@@ -137,11 +137,13 @@ interface ChatEmptyStateProps {
|
|
|
137
137
|
* resolves this to `sendMessage` with the suggestion's prompt.
|
|
138
138
|
*/
|
|
139
139
|
onSelect?: (suggestion: ChatSuggestion) => void;
|
|
140
|
+
/** Uses the concise empty-chat hierarchy. */
|
|
141
|
+
hero?: boolean;
|
|
140
142
|
/** Optional content rendered below the suggestion grid. */
|
|
141
143
|
footer?: ReactNode;
|
|
142
144
|
className?: string;
|
|
143
145
|
}
|
|
144
|
-
declare function ChatEmptyState({ eyebrow, title, description, suggestions, onSelect, footer, className, }: ChatEmptyStateProps): react.JSX.Element;
|
|
146
|
+
declare function ChatEmptyState({ eyebrow, title, description, suggestions, onSelect, hero, footer, className, }: ChatEmptyStateProps): react.JSX.Element;
|
|
145
147
|
|
|
146
148
|
interface ParsedCommand {
|
|
147
149
|
name: string;
|