feat: add fork assistant message to new session
Add fork button on assistant messages to start new execution session Include synthetic meta-instruction when forking to explain context
This commit is contained in:
@@ -354,6 +354,7 @@ class OpencodeService {
|
||||
providerID: string;
|
||||
modelID: string;
|
||||
text: string;
|
||||
prefaceText?: string;
|
||||
agent?: string;
|
||||
files?: Array<{
|
||||
type: 'file';
|
||||
@@ -372,6 +373,13 @@ class OpencodeService {
|
||||
// Build parts array using SDK types (TextPartInput | FilePartInput) plus lightweight agent parts
|
||||
const parts: Array<TextPartInput | FilePartInput | AgentPartInputLite> = [];
|
||||
|
||||
if (params.prefaceText && params.prefaceText.trim()) {
|
||||
parts.push({
|
||||
type: 'text',
|
||||
text: params.prefaceText
|
||||
});
|
||||
}
|
||||
|
||||
// Add text part if there's content
|
||||
if (params.text && params.text.trim()) {
|
||||
const textPart: TextPartInput = {
|
||||
|
||||
Reference in New Issue
Block a user