Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
19faa7a9
Commit
19faa7a9
authored
Jul 18, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Agent Container
parent
01992c4f
Pipeline
#28469
passed with stages
in 9 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/container/compat.ts
src/container/compat.ts
+18
-0
No files found.
src/container/compat.ts
View file @
19faa7a9
...
...
@@ -12,6 +12,7 @@ import { Context } from "./context";
import
{
Container
}
from
"
./impl
"
;
const
UI_KEY
=
"
NEOS_UI
"
;
const
AGENT_KEY
=
"
NEOS_AGENT
"
;
export
function
initUIContainer
(
conn
:
WebSocketStream
)
{
const
context
=
new
Context
({
...
...
@@ -35,3 +36,20 @@ export function getUIContainer(): Container {
throw
Error
(
"
UI Container not initialized !!
"
);
}
}
export
function
initAgentContainer
(
conn
:
WebSocketStream
)
{
const
context
=
new
Context
({});
const
container
=
new
Container
(
context
,
conn
);
CONTAINERS
.
set
(
AGENT_KEY
,
container
);
}
export
function
getAgentContainer
():
Container
{
const
container
=
CONTAINERS
.
get
(
AGENT_KEY
);
if
(
container
)
{
return
container
;
}
else
{
throw
Error
(
"
Agent Container not initialized !!
"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment