@knowlearning/agents 0.9.5 → 0.9.7
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/agents/browser/embedded.js +0 -2
- package/agents/generic.js +0 -1
- package/package.json +1 -1
- package/persistence/vuex.js +2 -2
|
@@ -40,8 +40,6 @@ export default function EmbeddedAgent() {
|
|
|
40
40
|
addEventListener('message', async ({ data }) => {
|
|
41
41
|
if (data.type === 'auth') {
|
|
42
42
|
// TODO: switch to access_token
|
|
43
|
-
debugger
|
|
44
|
-
console.log('localStorage "state", data.state, token, location --->>>', localStorage.getItem('state'), data.state, data.token, window.location)
|
|
45
43
|
if (localStorage.getItem('state') === data.state) {
|
|
46
44
|
localStorage.setItem('token', data.token)
|
|
47
45
|
}
|
package/agents/generic.js
CHANGED
|
@@ -433,7 +433,6 @@ export default function Agent({ host, token, WebSocket, protocol='ws', uuid, fet
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
function tag(tag_type, target, context=[]) {
|
|
436
|
-
console.log('TAGGING', tag_type, target, context)
|
|
437
436
|
return create({
|
|
438
437
|
active_type: TAG_TYPE,
|
|
439
438
|
active: { tag_type, target, context }
|
package/package.json
CHANGED
package/persistence/vuex.js
CHANGED
|
@@ -5,8 +5,8 @@ import MutableProxy from './json.js'
|
|
|
5
5
|
const copy = x => JSON.parse(JSON.stringify(x))
|
|
6
6
|
|
|
7
7
|
async function scopeIsUninitialized(scope) {
|
|
8
|
-
|
|
9
|
-
return
|
|
8
|
+
// TODO: better check
|
|
9
|
+
return Object.keys(await Agent.state(scope)).length === 0
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export default async function (storeDefinition, scope=window.location.host) {
|