@@ -7,6 +7,7 @@ import { titleForRoute } from "../../app-navigation.ts";
77import { applicationContext , type ApplicationContext } from "../../app/context.ts" ;
88import { hasOperatorReadAccess , hasOperatorWriteAccess } from "../../app/operator-access.ts" ;
99import { renderAgentScopeControl } from "../../components/agent-scope-control.ts" ;
10+ import { renderSettingsWorkspace } from "../../components/settings-workspace.ts" ;
1011import { t } from "../../i18n/index.ts" ;
1112import { watchAgentScope } from "../../lib/agents/index.ts" ;
1213import { copyToClipboard } from "../../lib/clipboard.ts" ;
@@ -416,40 +417,42 @@ class TasksPage extends OpenClawLightDomElement {
416417 </ button >
417418 </ div >
418419 </ section >
419- ${ renderTasks ( {
420- basePath : this . context . basePath ,
421- agentId : fallbackAgentId ,
422- mainKey : resolveUiConfiguredMainKey ( {
423- agentsList : this . context . agents . state . agentsList ,
424- hello : this . context . gateway . snapshot . hello ,
425- } ) ,
426- connected : this . gateway . connected ,
427- canCopy : hasOperatorReadAccess ( this . context . gateway . snapshot . hello ?. auth ?? null ) ,
428- // Task mutations need operator.write; read-only operators get no mutation buttons.
429- canCancel : hasOperatorWriteAccess ( this . context . gateway . snapshot . hello ?. auth ?? null ) ,
430- loading : this . listTask . status === TaskStatus . PENDING ,
431- error : this . error ,
432- copyResultError : this . copyResultError ,
433- tasks : this . tasks ,
434- cancellingTaskIds : this . cancellingTaskIds ,
435- sessionRow : ( sessionKey ) => findUiSessionRow ( this . context , sessionKey ) ,
436- onCancel : ( taskId ) => void this . cancelTask ( taskId ) ,
437- onRetry : ( taskId ) => void this . recoverTask ( taskId , "retry" ) ,
438- onDismiss : ( taskId ) => void this . recoverTask ( taskId , "dismiss" ) ,
439- onCopyResult : ( taskId ) => void this . copyTaskResult ( taskId ) ,
440- onNavigateToChat : ( sessionKey ) => {
441- const face = resolveSessionPreferredFaceForKey ( this . context , sessionKey ) ;
442- this . context . navigate (
443- face ,
444- sessionNavigationTarget ( {
445- context : this . context ,
420+ ${ renderSettingsWorkspace (
421+ renderTasks ( {
422+ basePath : this . context . basePath ,
423+ agentId : fallbackAgentId ,
424+ mainKey : resolveUiConfiguredMainKey ( {
425+ agentsList : this . context . agents . state . agentsList ,
426+ hello : this . context . gateway . snapshot . hello ,
427+ } ) ,
428+ connected : this . gateway . connected ,
429+ canCopy : hasOperatorReadAccess ( this . context . gateway . snapshot . hello ?. auth ?? null ) ,
430+ // Task mutations need operator.write; read-only operators get no mutation buttons.
431+ canCancel : hasOperatorWriteAccess ( this . context . gateway . snapshot . hello ?. auth ?? null ) ,
432+ loading : this . listTask . status === TaskStatus . PENDING ,
433+ error : this . error ,
434+ copyResultError : this . copyResultError ,
435+ tasks : this . tasks ,
436+ cancellingTaskIds : this . cancellingTaskIds ,
437+ sessionRow : ( sessionKey ) => findUiSessionRow ( this . context , sessionKey ) ,
438+ onCancel : ( taskId ) => void this . cancelTask ( taskId ) ,
439+ onRetry : ( taskId ) => void this . recoverTask ( taskId , "retry" ) ,
440+ onDismiss : ( taskId ) => void this . recoverTask ( taskId , "dismiss" ) ,
441+ onCopyResult : ( taskId ) => void this . copyTaskResult ( taskId ) ,
442+ onNavigateToChat : ( sessionKey ) => {
443+ const face = resolveSessionPreferredFaceForKey ( this . context , sessionKey ) ;
444+ this . context . navigate (
446445 face ,
447- sessionKey,
448- preferenceDerivedFace : true ,
449- } ) . options ,
450- ) ;
451- } ,
452- } ) }
446+ sessionNavigationTarget ( {
447+ context : this . context ,
448+ face,
449+ sessionKey,
450+ preferenceDerivedFace : true ,
451+ } ) . options ,
452+ ) ;
453+ } ,
454+ } ) ,
455+ ) }
453456 ` ;
454457 }
455458}
0 commit comments