text:
3.5 Breaks function assignments that use a complex Discriminated Unions Type

TypeScript Version:  3.4.5
Search Terms: Discriminated Unions Type, Function, Assignment, Type Property
Code
type Foo1 = {
  type: 'foo1';
  extra: number;
};

type Foo2 = {
  type: 'foo2';
  extra: string;
};

type Both = Foo1 | Foo2;

type FooTypes = Both['type'];

export type FooFromType<T extends FooTypes, O extends Both = Both> = O extends { type: T } ? O : never;

type FooExtraFromType<T extends FooTypes> = FooFromType<T>['extra'];

function fnWithFooExtra<T extends FooTypes>(type: T, extra: FooExtraFromType<T>) { }

// changing this to typeof fnWithFooExtra fixes it, even though it produces the exact signature
type FnType = <T extends FooTypes>(type: T, extra: FooExtraFromType<T>) => void;

// The error is produced here:
const fn: FnType = fnWithFooExtra;

Worked for a long time, but 3.5.1 breaks it. it hasn't been fixed on next. I tried 3.6.0-dev.20190608.
Interestingly, it breaks only on extra and not on the type itself. meaning that if I change FooExtraFromType to FooFromType it works.
If I use typeof instead of writing the signature it works. this is really weird as they are the exact same signature.
Expected behavior:
Compile as it had been working up to 3.4.5.
Actual behavior:
'fn' is declared but its value is never read.ts(6133)
Type '<T extends "foo1" | "foo2">(type: T, extra: (FooFromType<T, Foo1> | FooFromType<T, Foo2>)["extra"]) => void' is not assignable to type 'FnType'.
  Types of parameters 'extra' and 'extra' are incompatible.
    Type 'FooFromType<T, Foo1>["extra"] | FooFromType<T, Foo2>["extra"]' is not assignable to type 'FooFromType<T, Foo1>["extra"] & FooFromType<T, Foo2>["extra"]'.
      Type 'FooFromType<T, Foo1>["extra"]' is not assignable to type 'FooFromType<T, Foo1>["extra"] & FooFromType<T, Foo2>["extra"]'.
        Type 'number' is not assignable to type 'FooFromType<T, Foo1>["extra"] & FooFromType<T, Foo2>["extra"]'.
          Type 'number' is not assignable to type 'FooFromType<T, Foo2>["extra"]'.
            Type 'number' is not assignable to type 'string'.
              Type 'FooFromType<T, Foo1>["extra"]' is not assignable to type 'FooFromType<T, Foo2>["extra"]'.
                Type 'FooFromType<T, Foo1>' is not assignable to type 'FooFromType<T, Foo2>'.
                  Type 'FooFromType<T, Foo1>["extra"]' is not assignable to type 'string'.
                    Type 'number' is not assignable to type 'string'.ts(2322)

Playground Link: Doesn't break on playground, I guess the version is old.

Working Playground link
Indexed access type + inferred intersection = #30769, I'd wager.

Fix up: #31837

Here is a smaller repro.
// You need the two aliases to avoid variance measurements.

type A1 = <
T extends { x: number, y: string } | { x: boolean, y: number}
>(
  x: T["x" | "y"]
) => void

type A2 = <
T extends { x: number, y: string } | { x: boolean, y: number}
>(
  x: T["x" | "y"]
) => void

declare const a: A1;
let b: A2 = a; // error, even though A1 and A2 are identical.

oof, just bonked into this with code like
interface A {
    k: "a";
    v: string
}

interface B {
    k: "b";
    v: number
}

interface I {
    method<K extends "a" | "b">(
        k: K,
        v: Extract<A | B, { k: K }>["v"]
    ): void;
}

class C implements I {
    method<K extends "a" | "b">( // error!
    //~~~~ Type 'Extract<A, { k: K; }>["v"]' is not assignable to
    // type 'Extract<A, { k: K; }>["v"] & Extract<B, { k: K; }>["v"]'.
        k: K,
        v: Extract<A | B, { k: K }>["v"]
    ) { }
}

in this SO question

No longer errors, though jcalz's still does.

authors: RyanCavanaugh alitaheri fatcerberus jack-williams jcalz


text:
Read big JSON files?

Bug Report
🔎 Search Terms
"large json files"
Problem
None of the predefined sections are relevant here.
I'm trying to get types from a JSON file using resolveJsonModule. I'm using VS Code to do everything here. My JSON file is 4.9 MB and 200k lines. When I try to inspect the result of require('./big-file.json), it says {}. But it works great for another smaller file, albeit a bit slow.
Not sure if this is relevant or not, but it also fails for this big file in quicktype and works for the slightly smaller file. I assumed they're using TypeScript's parser/compiler under the hood, which would explain it. If they're not, then maybe it's a Node.js limitation that it's coming across.
To be clear, the require call itself works fine and returns a valid JSON object. So it might not be a Node.js memory limitation issue. But it might be one if TypeScript is more than doubling the memory by all its type analysis, or by duplicating substrings, etc.
Just some thoughts. I have no idea what's going on. All I know is that I was hoping VS Code would analyze my JSON files for me, but it's only working on some files.

Not sure how quicktype works.
Our JSON support involves using the normal type system mechanics and is going to not do well on huge huge huge files. I'd really recommend generating a .d.ts file from a smaller subset of it or writing a manual definition if your file is that big; there's not much we can do to improve performance in this particular case.

That's pretty much what I did, manually figured out the types at runtime and wrote them down in a .d.ts file. So never mind I suppose. Thanks.

Same error here.

So I have a large GeoJSON object as a file and it runs into this same issue. All the worlds nations outlines are represented in coordinate pairs. I have however included a context.d.ts file which is read succesfuully, but the GeoJSON object is not and it seems to only appear as an empty object (error below):
Property 'type' is missing in type '{}' but required in type 'CountryJson'.ts(2741)
the context.d.ts file:
declare namespace SomeNamespace {     export interface CountryJson {         features?: Array<T>;         type: string;     } }
After deleting countries from the array, starting by removing half and doing so until it goes, the error eventually disappears. I got it down to the difference of one additional country. I tried deleting the same country and random countries and it has the same effect.
It seems like TS taps out with larger objects, it would be good if the error message was clear about this as it caused quite a bit of time to be wasted figuring this out.

@alanscandrett did you get anywhere with this? I'm trying to do the same with a geojson file

@alanscandrett did you get anywhere with this? I'm trying to do the same with a geojson file

Unfortunately not, I just split the dataset :/

Same problem, that is an issue. My file isn't that big (33k lines) and it's just a bunch of arrays. No complex nesting or anything.

source: gharchive/issue

authors: MrScriptX RyanCavanaugh alanscandrett jzxchiang1 kdthomas2121 sdegutis

repo: microsoft/TypeScript

license_type: permissive

license_source: github-api


text:
Type narrowing not work with inferred function arguments

Bug Report
🔎 Search Terms
type narrow argument
🕗 Version & Regression Information

This is the behavior in every version I tried

⏯ Playground Link
https://www.typescriptlang.org/play?ts=4.4.2#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwHcYoAHAMTTAApEAueKzAD3oGEMmBKeAXgD54ANxxZgnesNEAoUJFgIU6bHnhwAjsixwAyhhhUAzvQN6sqAObihI4FKlmMIGIihgE7JvADeU+PAwAFjA4BIYYUBjIRvCoyAC2AEZOVqgggk4A3FIAvnZQBgCe6EiUyviIAEyMHGwc3D5+ECAY8NEmMGbm8AA+SFAQBgg88GigiGYgwPD506gFvvBYiAwAhAbczAB0gcGhAIwADAecC+qaOnqGJ7lSRKQU6FT5RWAlSrj41SzwHvULTS02qYLD0+gMhiNUGMJlMZlA5gslqt1vAtjsQlRDsdTiANFoQLp9OscidbsRyJQnoViopMB8GMw-o1mq1jMCur0XODeJDoalYQZZvM-EiqGsNhxtkEMViTn4zvjCVd4AB6FXwAA8AFotfAAAYGPWLQXtTqgrmDElSIA
💻 Code
declare function wrapFunc(f: (ctx: Ctx) => void): void
declare function requireStr(s: string): void

interface Ctx {
  throw(status: number): never;
}

async function f2(ctx: Ctx) {
  let s: string | false = undefined as any
  if (!s) ctx.throw(100)
  requireStr(s)
}

wrapFunc(async function (ctx: Ctx) {
  let s: string | false = undefined as any
  if (!s) ctx.throw(100)
  requireStr(s)
})

wrapFunc(async function (ctx) {
  let s: string | false = undefined as any
  if (!s) ctx.throw(100)
  requireStr(s) // <-- Compile Error!  here `s` is string | false
})

Documented as a limitation of https://github.com/microsoft/TypeScript/pull/32695. https://github.com/microsoft/TypeScript/pull/33622 considered calling this out as an error, but ultimately decided against it for never-returning functions. You can choose between the type annotation and simply writing return ctx.throw(100).

authors: andrewbranch weijarz


text:
import React removed when saving TSX file (when source.organizeImports is enabled)

Issue Type: Bug
Hi,
If I enable source.organizeImports in my settings.json like so:
{
    "[typescript][typescriptreact]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    }
}

Then on save, VS Code will automatically remove the React import line from files like this TSX file, even though importing React is required for JSX/TSX files:
import React from 'react'; // This line gets removed on file save

function App() {
  return (

  );
}

export default App;

For large JSX files, this is especially apparent because ESLint will output a plethora of "'React' must be in scope when using JSX" errors.

Naturally, the only way to get the React import to stick is to reference something like React.memo or React.MouseEvent in my code, although this is not ideal.
import React from 'react'; // This no longer gets removed on file save

const App = React.memo(() => {
  return (

  );
});

export default App;

I believe this behavior to be the result of the 1.68.0 release, since I only started experiencing this issue a day or two ago, and the 1.68 release made some changes to organizeImports (per the release notes).
I tried digging into the settings and reading online—it doesn't seem that the source.organizeImports setting is very configurable beyond specifying which language mode(s) it applies to. I have already searched open issues, disabled all my extensions, and tried the Insider build, to no avail in any case.
Can someone please confirm if this is a 1.68 bug, and if there are any workarounds in the interim?
Thank you in advance!
Caleb
System Information
VS Code version: Code 1.68.0 (4af164ea3a06f701fe3e89a2bcbb421d2026b68f, 2022-06-08T11:43:24.900Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No

System Info

Item
Value

CPUs
Apple M1 (8 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
8.00GB (0.11GB free)

Process Argv
. --crash-reporter-id 0ad5d613-9997-4c57-8cea-d275b013e8a2

Screen Reader
no

VM
0%

Extensions (28)

Extension
Author (truncated)
Version

language-x86-64-assembly
13x
3.0.0

sca-for-vscode
cal
3.0.0

vscode-eslint
dba
2.2.2

FreeMarker
dco
0.0.9

EditorConfig
Edi
0.16.4

vscode-graphql
Gra
0.4.12

selected-lines-count
gur
1.4.0

beautify
Hoo
1.5.0

applescript
idl
0.21.1

svg
joc
1.4.18

cornflakes-linter
kev
0.5.1

AWK
lug
0.0.2

vscode-latex
mat
1.2.0

Lisp
mat
0.1.12

vscode-apache
mrm
1.2.0

remote-ssh-edit
ms-
0.80.0

advanced-new-file
pat
1.2.2

tcl
ras
0.1.0

prolog
reb
0.0.4

mdx
sil
0.1.0

pegjs-language
Sir
1.0.4

rewrap
stk
1.16.3

shellcheck
tim
0.19.5

hosts
tom
1.2.0

transpose
v4r
0.0.5

highlight-matching-tag
vin
0.10.1

gitblame
wad
8.2.2

viml
Xad
2.1.2

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdc:30486549

Dupllicate #49486

@caleb531 what's your jsx compiler setting?

@RyanCavanaugh If I understand you correctly, I have "jsx": "preserve" set in my tsconfig.json.
But empirically, I re-enabled source.organizeImports and disabled the ESLint react/react-in-jsx-scope error, and my app still ran just fine even after the React import was stripped out. So I can confirm that the React import is indeed no longer required, per #49486.
Thank you for checking in!


text:
Type Narrowing Inside Looping Structure Conditions not Persisting

Bug Report
🔎 Search Terms
Looping, Condition, Inference, Chain, And, &&, Array
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about Type Guards

⏯ Playground Link
Playground link with relevant code
💻 Code

let arr: Array<Array<boolean> | number> = [[true]];

for (let i = 0; i < arr.length; i++)
    if (arr[i] instanceof Array && arr[i].length > 0)  // Property 'length' does not exist on type 'number | boolean[]'.
        console.log(arr[i].length);  // Property 'length' does not exist on type 'number | boolean[]'.

if (arr[0] instanceof Array && arr[0].length > 0)
    console.log(true);

🙁 Actual behavior
When attempting to compile, the condition arr[i] instanceof Array infers that arr[i] is an Array and has the property length but this inference is not continued throughout the rest of the condition nor body within the condition due to the variable i. This behavior does not match the behavior with a fixed-index as is shown in the fixed-index block.
🙂 Expected behavior
Ideally, the inference from arr[i] instanceof Array would be continued into arr[i].length > 0 due to it being an && which makes the second condition never run unless arr[i] is an instance of  Array. This should also be the case for the body of the if statement. This behavior is shown with a fixed index but does not apply to a variable one.

It has nothing to do with the loop.  It's just that obj[key] isn't narrowed when key is not a literal.  Duplicate of https://github.com/microsoft/TypeScript/issues/51368 -> https://github.com/microsoft/TypeScript/issues/10530

Workaround: First assign the value arr[i] to a variable inside the loop and narrow that.


text:
Function type notation for object properties handles union parameters inconsistently

🔎 Search Terms
"function type notation", "union function parameter", "different function type", "object property function type"
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about strict function types

Before 3.9.7, this was a bug in both cases cited below, not just the anonymous function case.
⏯ Playground Link
https://www.typescriptlang.org/play?#code/C4TwDgpgBAcgrgWwEYQE4HlUGVioJYB2A5lALxQGIqpQA+UAzroUQNwBQ7AZnAQMbA8AewIUqadJFQBDYENQAKSggBcY5GgCUUAN7soUPiIZCANhAB0poUSWIoAaigBGTRwC+nHv0EjGzYkk0WXkFJlQ1cJZtPQMjAhNzKxsw3EcoACIACzwMt3ZPdlBIKAAVCCYgmTlUUvAKsl19KAB6FrKsiuhgAHchRiyhOFMAEygUKG8BYQJpU1MQKAgARzg8ADc5iAJgC2auAiqQiKgwuCQAKwgBNXgNDGwAom1SAD4odaE8EY4DaQIREcamdLtdgLdxA8cPhiJo1J9vh4vLxpn4DgBRAAe1zgwAgIKuN1gkMw0JYABooEIpMc1OVKjSanVIAwANoZA5A+QZAC6MWa1OCwIY50JwHyhSmvlE-xEWJxeIJYIh91JT0pguq8jpFWAXNq9TZGVlh0Z3L5TQMmuOSoEEs4bQ6eAYUGAWVQQh6LukrvqS1QHpoCmkLrwwAGQ1Gmj2joAAsAGABaCCYyACZMB+TcAjyvi4-HOSnKaj6-LsR2lHIukZCCoEADku3YJtz+YUhfUJbNqHyQA
💻 Code
type NumberOrString = number | string;

function numberOperator(num: number) {
  console.log(num + 1);
}

function stringOperator(str: string) {
  console.log(str + "hi");
}

type TestOperatorTypes = {
  // These two should be functionally equivalent.
  fnOperator: (subject: NumberOrString) => void;
  anonOperator(subject: NumberOrString): void;
}

function fnExecute(subject: NumberOrString, operator: TestOperatorTypes["fnOperator"]) {
  operator(subject);
}

function anonExecute(subject: NumberOrString, operator: TestOperatorTypes["anonOperator"]) {
  operator(subject);
}

// This throws a type error (as it should).
// @ts-expect-error
fnExecute(1, numberOperator);

// This doesn't.
anonExecute(1, numberOperator);

🙁 Actual behavior
anonExecute(1, numberOperator); doesn't error. It should have because numberOperator does not consume a union parameter type - it consumes a specific member of the union.
🙂 Expected behavior
anonExecute(1, numberOperator); errors because numberOperator does not consume a union parameter type.
Additional information about the issue
No response

Was able to replicate this when constructing objects too. Playground Link

Unfortunately using the "method" syntax exempts functions from the strictFunctionTypes checks, and such functions will have their parameters checked bidirectionally.
Not doing something like this would break a lot of code, making lots of collections invariant.


text:
for (const x in #b) is allowed

🔎 Search Terms
Private identifier, for...in
🕗 Version & Regression Information

This changed between versions 4.5.5 and 4.6.4

⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.5.0-dev.20240603#code/MYGwhgzhAECC0G8BQ1oGIBGAKAlIlq0AZgPYBO0WwJAdhAC7RjQCWN6Geyh0Avgf35A
💻 Code
class A {
  #b() {
    for (const a in #b) {
    }
  }
}

🙁 Actual behavior
No errors
🙂 Expected behavior
Error: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
Additional information about the issue
Noticed this while working on https://github.com/typescript-eslint/typescript-eslint/pull/9232. There's a very suspicious condition in code: https://github.com/microsoft/TypeScript/blob/5a4134470128a062a8297f404dfb3321f8f55798/src/compiler/checker.ts#L33699
    function checkGrammarPrivateIdentifierExpression(privId: PrivateIdentifier): boolean {
        if (!getContainingClass(privId)) {
            return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
        }

        if (!isForInStatement(privId.parent)) {
            if (!isExpressionNode(privId)) {
                return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);
            }

            const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === SyntaxKind.InKeyword;
            if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) {
                return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId));
            }
        }

        return false;
    }

I don't know what isForInStatement is supposed to do there. I was unable to find the commit that introduced this—git blame took me to #44648 but that didn't have this condition.

Launched bug fix #58798 it seems that some of the logics were introduced in the bug fix #46824 .
Some of the thoughts here: first into logic getContainingClass(), after that,  check whether it's in a for-in block and privId is the initializer part of the for-in, if so, this would be caught by the checkForInStatement().
Then into the isExpressionNode() logic, which would only allow privId be the left side of the In-expression, which the problem of right sight of for-in block would solved with a Error Diagnosis.
After these logic, we can make sure only privIds in In-expression come out and then we check its declaration.

authors: Josh-Cena bernard-wang


text:
string enum works from exported strings but not from strings exported as const

🔎 Search Terms
enum
🕗 Version & Regression Information
TypeScript: 5.5.3

This is the behavior in every version I tried

⏯ Playground Link
Reproduction Project
💻 Code
// FILE: ./case1.ts
export const Case1_ImageJpegType = 'image/jpeg'
export const Case1_ImagePngType = 'image/png'

// FILE: ./case2.ts
export const Case2_ImageJpegType = 'image/jpeg' as const
export const Case2_ImagePngType = 'image/png' as const

// FILE: ./test1.ts
import {Case1_ImageJpegType, Case1_ImagePngType} from './case1.js'

enum Case1 {
  // WORKS AS EXPECTED
  Png = Case1_ImagePngType,
  Jpeg = Case1_ImageJpegType,
}

// FILE: ./test2.ts
import {Case2_ImageJpegType, Case2_ImagePngType} from './case2.js'

enum Case2 {
  // FAILS WITH: Type 'string' is not assignable to type 'number' as required for computed enum member values.
  Png = Case2_ImagePngType,
  Jpeg = Case2_ImageJpegType,
}

🙁 Actual behavior
Exporting a string as const breaks string enums.
npx -p typescript@5.5.3 tsc --noEmit -p tsconfig.verbatime-false.json
// FAILS with
// Type 'string' is not assignable to type 'number' as required for computed enum member values.

🙂 Expected behavior
Exporting a string with or without as const should not break string enums.
npx -p typescript@5.5.3 tsc --noEmit -p tsconfig.verbatime-false.json
// SHOULD NOT FAIL

export const MyConst = 'MyConst'
export const MyConst = 'MyConst' as const

should behave the same when used as
import {MyConst} from './something'

enum MyEnum {
  MyType = MyConst,
}

Looks like the generated typings are different with as const.
export declare const Case1_ImageJpegType = "image/jpeg";
versus
export declare const Case2_ImageJpegType: "image/jpeg";
Exactly why, I couldn't say, but I'm guessing the problem is related to the lack of an assigned value in the latter.

Exactly. It is a sneaky difference in the generated .d.ts file. I don't know the exact semantic difference between the two
export declare const A1 = 'A'
export declare const A2: 'A'

For mere curiosity, aside from the issue explained, I would be glad if someone could point me to a resource/documentation explaining the difference between the two syntaxes.

// Widening literal type
export declare const A1 = 'A'
// Nonwidening literal type
export declare const A2: 'A'

See also https://mariusschulz.com/blog/literal-type-widening-in-typescript
The difference is basically that a reference to the unannotated one is preferentially string but can act as "A" in context, whereas the other is always just "A". This difference needs to exist for idiomatic code like this:
const DefaultUserName = "anonymous";
const users = [DefaultUserName];
// OK
users.push("bob");

vs here with the nonwidening behavior, you get an error:
const DefaultUserName = "anonymous" as const;
const users = [DefaultUserName];
// Error
users.push("bob");

Thanks @RyanCavanaugh for the clarification about the two syntaxes.
What I still find strange is the fact that the widened form export declare const A1 = 'A' can be used as valued for an enum, while the nonwidening form export declare const A2: 'A' can't be used as enum value.
From what I understand from your explanation and from the article literal-type-widening-in-typescript, it should be the exact opposite or at least a nonwidening form should still be a valid string enum value.

I understand the rationale for the difference with respect to how it affects typing now. Is the lack of a literal value in the emit what keeps you from being able to treat it as such? Would it be possible to emit export declare const A2: 'A' = 'A' instead, and if so would that solve the problem?

@RyanCavanaugh please can you reopen the issue? It seams to be an issue with the enum rather than a feature.
Given these two forms
export const Case1_ImageJpegType = 'image/jpeg'
export const Case2_ImageJpegType = 'image/jpeg' as const

they should be both valid enum values. Especially the second one, which at the moment is treated as an error.

cc: @weswigham @jakebailey

Since this is "working as intended", I think it needs to be approached as a proposal to change the emit.

Would it be possible to emit export declare const A2: 'A' = 'A' or export declare const A2 = 'A' as const instead, and if so would that solve the problem?

@daniele-orlando can you open a separate issue for that? Thanks

authors: RyanCavanaugh daniele-orlando snarbies


text:
Many interfaces seem to be broken when exactOptionalPropertyTypes is enabled.

⚙ Compilation target
ES2018
⚙ Library
lib.es.2018.regexp.d.ts
Missing / Incorrect Definition

interface RegExpExecArray {
    groups?: {
        [key: string]: string;
    };
}

Sample Code
With "exactOptionalPropertyTypes": true, then this interface implies that for all properties of groups there will always be a string, which is wrong. I suspect that this pattern is largely endemic when using exactOptionalPropertyTypes.
const matrixToRegexp =
  /^https:\/\/matrix\.to\/#\/(?<entity>[^/?]+)\/?(?<eventId>[^?]+)?(?<query>\?[^]*)?$/;

const url = matrixToRegexp.exec(matrixTo)?.groups;
if (!url) {
  return ActionError.Result(`Not a valid matrix.to URL: ${matrixTo}`);
}
const eventID = url.eventId // eventID is typed as `string` when it should be `string | undefined`

Why is this a recommended setting when it actually quite dangerous^1? Especially when combined with typescript-eslint's  no-unnecessary-condition rule, which will use typescript's incorrect information to recommend removal of "redundant" checks. This is quite serious.

### Documentation Link

_No response_

Seems like you want to turn on noUncheckedIndexedAccess

Hey, that's right, thank you!

Maybe https://www.typescriptlang.org/tsconfig/#noUncheckedIndexedAccess should be recommended though

authors: Gnuxie RyanCavanaugh


text:
Add assignability rules for when the target is a conditional type

Inspired by looking into #27014
Fixes #26933
Steals from #27589
This adds assignability rules for relating types when the target is a conditional type. We only check for conditional type target assignability when:

The target is not distributive or,
The distributive conditional type's check type cannot be instantiated to never
Given these circumstances, a type is assignable to the conditional in question if
it is assignable to both branches of the conditional, or
if the conditional type looks to be always true (yet has infer types, preventing simplification) and it is assignable to the intersection of the instantiated constraint of the true branch and the uninstantiated constraint (this allows for "independent" infer types to not interfere with true branch assignability, whilst still preserving the assignment-blocking part of the existential-like behavior of the infer types).

When you write: it is assignable to the intersection of the instantiated constraint of the true branch and the uninstantiated constraint.
By instantiated are you referring to the instantiation of the infer parameters? Would it be possible to write a small example that shows the difference between the proposed behaviour, and the behaviour if you only consider the uninstantiated true constraint (as opposed to the intersection)?
I have a hard time translating the rules into concrete examples, so it would be greatly appreciated!

Does this address the unsoundness in #26945?

This experiment is pretty old, so I'm going to close it to reduce the number of open PRs.

source: gharchive/pull-request

authors: dgreensp jack-williams sandersn weswigham


text:
Fix incorrect lib condition again!

Reiteration of #58867

@typescript-bot test it


text:
Zero score (every output is None) on evaluation captioning with pretrained model

I tried to run and eval captioning with your pretrained model and YouCookII dataset, but met this issue. I follow the instructions, but every hyp on eval_epoch is  none and every scores is 0.0 (do not pay attention on METEOR = 1.0, it's a stub).
Add logs for you - log.txt
Hyp.txt - hyp.txt
Thank you

I tried to run and eval captioning with your pretrained model and YouCookII dataset, but met this issue. I follow the instructions, but every hyp on eval_epoch is none and every scores is 0.0 (do not pay attention on METEOR = 1.0, it's a stub). Add logs for you - log.txt Hyp.txt - hyp.txt
Thank you

Hi! Do you know how to download the raw videos of YouCook2? Thank you very much!

authors: Borntowarn tiesanguaixia

repo: microsoft/UniVL

license: MIT


text:
Colab demo: AttributeError: 'Qwen2Config' object has no attribute 'quant_config'

When running colab demo on https://colab.research.google.com/github/microsoft/VPTQ/blob/main/notebooks/vptq_example.ipynb , I encountered AttributeError: 'Qwen2Config' object has no attribute 'quant_config' when executing m = vptq.AutoModelForCausalLM.from_pretrained("VPTQ-community/Qwen2.5-7B-Instruct-v8-k65536-0-woft", device_map='auto', dtype=torch.half).

As we have updated quant_config in config.json, and you may need to update config.json file or VPTQ installation. Thanks for point this out, and let me update ipynb.
pip install vptq -U

fixed in https://github.com/microsoft/VPTQ/pull/138
Thanks!

repo: microsoft/VPTQ


text:
Gazebo under WSL2 (Ubuntu 18.04) only uses CPU.

I'm a robotics researcher and I've been using Gazebo in Ubuntu.
I recently started using WSL2 in Win11 and I found that Gazebo in Ubuntu 18 was only 10-30 FPS because the CPU was running at 100% load and the GPU was not occupied.
However, Gazebo in Ubuntu 20 reached 60 FPS while the GPU was used and the CPU load was greatly reduced.
I enjoyed the experience of using WSL2 under Win11, and if this one small issue could be fixed, it would be a huge boost to my research.

This is supported already for Gazebo to use the GPU. My guess is that since you're using Ubuntu 18 it doesn't have the latest mesa version which has support for the GPU. Are you able to try your workflow on the latest Ubuntu version and see if that hits your GPU?
Also if you run into issues again after trying the above, please file an issue at this repo: https://aka.ms/wslg as that will have the best people to take a look at it it.
Here's me running Gazebo and RViz with GPU acceleration.

I have same problem as SaligiaR. On WSL 2 with ubuntu 18.04 gui simulation consume 4x more CPU than GPU. In WSL 2 with ubuntu 20.04 is CPU/GPU ratio same and simulation goes much better.
WSL with win11 is great and I would be very disappointed to return to linux.... Thnaks for all answers

Have you solved this problem? If so what did you do?
Because I'm having issues with hardware accelation with gazebo and rviz through ROS melodic, Ubuntu 18.04 and Wsl2. In particular, when I run the vxsrv server with opengl accelaration enabled, I have a segmentation fault error as well as GPU device not found. Notice that other programs like gedit works fine.
So, what should I do?
Thanks for all the answer.

I have met the same Problem in Ubuntu 18.04.My Nvidia GPU is not used mostly,but the CPU is 100 percent.
1.I get the info that "you can visit Mesa official home and build a private version of Mesa with this support. Alternatively, you can try out Canonical recently announced Ubuntu on Windows Community Preview for WSL 2."fromhttps://devblogs.microsoft.com/commandline/wslg-architecture/,but my resources are all in ubuntu-18.04 .I am afraid of they can not run nomally on  the others.
2.https://github.com/microsoft/wslg/issues/86But when I update my driver it don't work.

I spent a couple hours of this problem and still am unable to get hardware acceleration working with W11 + WSL2 + Ubuntu 20.04 + Docker. I was however able to install cuda onto my wsl ubuntu 20.04. I also ran the demo provided and ran nvidia-smi command with no issues inside my Ubuntu 20.04 and docker instance. However, RVIZ and other GUI apps in my docker are still not using hardware acceleration from my nvidia GPU unfortunately.

@billyliuschill  Even I have the same issue .. did you found any workable method for this ?

authors: PieterT-CODES SaligiaR Starkhen caldi99 complete-dope craigloewen-msft

repo: microsoft/WSL


text:
UDP socket programming is not working - Data is not reaching wsl adapter

Version
Microsoft Windows [Version 10.0.19044.2130]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.16
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
with windows are server , create a socket and try to send messages to wsl2
Expected Behavior
message reaching wsl2 network adapter
Actual Behavior
message not reaching wsl2 network adapter
Diagnostic Logs
No response

Howdy, could you be a bit more specific, some more details? If you're trying to access via localhost:UDP that isn't currently implemented.

Well I was trying to create a socket programming to communicate between Windows and WSL2 Ubuntu . Even though data has been send from the windows network adapter , the data is not getting received in WSL2 adapter

You really need to give me more detail. Knowing if the host is attempting to address localhost or the generated private address is example.

It is trying to connect to a private address


text:
Sometimes Xpaths fail to locate elements even after making the thread to sleep for more than 20 secs

I am automating a desktop (UWP) app written in Xaml. Here, I have a textbox label whose value I want to assert. Luckily, I have automationid to locate this windows element. My problem is, the mentioned automation element doesnt have any text, instead its child element has got the desired text.
Solutions I have tried so far:

Xpath - "//star[AutomationId=""]/child::star"
This works most of the time. But sometimes, the driver is not able to locate the element even after waiting for over 20 secs. And it throws"element could not be located using the given search parameters" error.
Got the windows element by using its automation id.
driver.findelementbyaccessibilityid(""")
And then tried to get text inside the child element using GetAttribute("FirstChild")
Fails every time.

Please suggest a solution for my issue.

Could you provide the screenshot of app visual tree form Inspect.exe?

repo: microsoft/WinAppDriver


text:
How to launch WinappDriver with /forcequit in Appium ?

If I want to launch WinAppDriver through Appium with /forcequit flag, how do I do it ?
var appCapabilities = new AppiumOptions(); appCapabilities.AddAdditionalCapability("forcequit", true);
Would the code above work ?
Thank you !

I believe it is not implemented, at least this is what I think after some googling around.

I did it the following way and WinAppDriver didn't complain:. Don't know how it will impact the test methods.
appCapabilities.AddAdditionalCapability("forcequit", "true");

authors: Hoang-Minh naeemakram


text:
Built app cannot run without MSVC or Win11 SDK

Describe the bug
Project here
https://github.com/AkazaRenn/FruitLanguageSwitcher/tree/dev/minimalist
Tested on VM's gotten from here
The VM came with Visual Studio pre-installed, and could run the app without issues. Once I had Visual Studio uninstalled through Visual Studio Installer, the app no longer starts. Same thing happened on my laptop on which Visual Studio has never been installed. I've tried both self-contained package and non-self-contained, neither worked.
Update: I have narrowed down the dependencies, here are the two parts that need to be present to make the app able to start correctly, removing either one of them will result in the crash:

Removing either one of them leads to 0xc000027b to Microsoft.ui.xaml.dll, same as the logs below, I've confirmed the dll is still there.
Event Logs here
Non-self-contained:
Faulting application name: FruitLanguageSwitcher.exe, version: 1.0.0.0, time stamp: 0x6387d353
Faulting module name: Microsoft.ui.xaml.dll, version: 3.0.0.2212, time stamp: 0x7dc2efab
Exception code: 0xc000027b
Fault offset: 0x00000000007cd8ec
Faulting process id: 0x0x28C4
Faulting application start time: 0x0x1D92ACDEE90D670
Faulting application path: C:\Program Files\WindowsApps\AkazaRenn.82975CBC0BB1_1.1.0.0_x64__fhf2jh1qk9hx4\FruitLanguageSwitcher.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.ui.xaml.dll
Report Id: 996bcb22-e922-406b-a684-47a646bbb4bc
Faulting package full name: AkazaRenn.82975CBC0BB1_1.1.0.0_x64__fhf2jh1qk9hx4
Faulting package-relative application ID: App

Self-contained:
Faulting application name: FruitLanguageSwitcher.exe, version: 1.0.0.0, time stamp: 0x62cf0990
Faulting module name: Microsoft.ui.xaml.dll, version: 3.0.0.2212, time stamp: 0x7dc2efab
Exception code: 0xc000027b
Fault offset: 0x00000000007cd8ec
Faulting process id: 0x0x28CC
Faulting application start time: 0x0x1D92A9EFE0B0AA5
Faulting application path: C:\Program Files\WindowsApps\AkazaRenn.82975CBC0BB1_1.1.0.0_x64__fhf2jh1qk9hx4\FruitLanguageSwitcher.exe
Faulting module path: C:\Program Files\WindowsApps\AkazaRenn.82975CBC0BB1_1.1.0.0_x64__fhf2jh1qk9hx4\Microsoft.ui.xaml.dll
Report Id: 4f12dd8f-f1b6-401f-892d-0750d159fdcc
Faulting package full name: AkazaRenn.82975CBC0BB1_1.1.0.0_x64__fhf2jh1qk9hx4
Faulting package-relative application ID: App

I think 0xc000027b is for dll not found, is it? However, if I do a ls on the file, I can certainly see it there:
PS C:\Users\i> ls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.ui.xaml.dll"

    Directory: C:\Program
Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          12/15/2022  6:03 AM       14865344 Microsoft.ui.xaml.dll

Here's a list of runtime installed on my test laptop, which didn't help

Steps to reproduce the bug

Build the solution from here
Package as a MSIX app for sideloading
Move the production to another machine on which Visual Studio is not installed
Install app using the Install.ps1 script generated when creating MSIX package
See the app crash on startup (should stay in tray if not crash) and find logs in Event Viewer

Expected behavior
No crash, the app should not take Visual Studio as a prerequisite of running.
Screenshots
No response
NuGet package version
Windows App SDK 1.2.2: 1.2.221209.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response

Funny enough, it's a problem with C++ 14... After changing the dll to be built with C++ 17, the problem is fixed.

repo: microsoft/WindowsAppSDK


text:
Feature [Allow Optionals Params]

Pull Request Summary
This pull request introduces several enhancements and updates to the codebase. The changes include the addition of new functionality, internal documentation updates, improvements to the README.md file, the creation of a new class, updates to the concatUserFlow method, and UI refinements using the Visibility widget.
Changes Made

Added the ability to include optional parameters in the AADLoginButton widget to customize the URL. The optionalParameters parameter now accepts a list of OptionalParam objects, where each object represents a parameter name and its corresponding value.

Updated the README.md file to include detailed instructions on how to utilize the optionalParameters parameter. An example was provided to demonstrate the addition of new parameters to the URL.

Created a new class, OptionalParam, to encapsulate the key-value pairs for the optional parameters.

Improved the concatUserFlow method to incorporate the optional parameters in the URL generation process.

Updated the UI implementation to utilize the Visibility widget. This change allows for the removal of unnecessary Stack widgets, resulting in a cleaner and more efficient UI structure.

These changes enhance the flexibility and customization options of the AADLoginButton widget, while also improving code organization, readability, and user experience.
Please review the changes and provide any feedback or suggestions for further improvements.
Thank you.

@microsoft-github-policy-service agree company="nnoxx-inc"

Marking this pull request as ready for review.

@Baxi19  thank you for your contribution, I will review it in some days :)

Hi @mohanajuhi166
What is the next step to merge this pull request?

@Baxi19 thank you for your contribution, it's deployed now to pub.dev
We would love to know how this package is being currently utilized as we want to add a documentation going forward and also open up issues/features :)
Kind regards,
Mohana

Hello @mohanajuhi166 ,
Thank you for reviewing my pull request.
Currently, the package is being used in a project where it serves as a WebView for Azure Active Directory B2C authentication.
In this particular project, we required the ability to include an optional parameter in the URL to differentiate between app mobile and web page sources. This addition allows us to handle different scenarios and customize the behavior accordingly.
By adding support for optional parameters, it enhances the flexibility and adaptability of the package, making it more versatile for various use cases.
If you have any further questions or need additional information, please feel free to let me know. I'm glad to assist you in any way I can.
Best regards,
Randald Villegas.

thanks @Baxi19 !, if you want to be one of the active contributors here ,let us know :) .

@mohanajuhi166  Yes, I would like to be one of the active contributors here.
I am eager to contribute and assist in any way I can.

@Baxi19 thank you!! will include you as a reviewer for other pull requests etc :)


text:
[Bug] [autogenstudio]: duplicate part of prompt when use groupchat

Describe the bug
In case where you use a group chat workflow, the part with skill is duplicate:
i found two times :
While solving the task you may use functions below which will be available in a file called skills.py .\nTo use a function skill.py in code, IMPORT THE FUNCTION FROM skills.py  and then use the function.\nIf you need to install python packages, write shell code to\ninstall via pip and use --quiet option.\n\n         \n\n##### Begin of get_browse_service_in_the_network #####        ...................n\n#### End of get_browse_service_in_the_network ####
with same skill
it seems that it caused by the load function in class AutoGenWorkFlowManager

    agent_spec = self.sanitize_agent_spec(agent_spec)
    if agent_spec.type == "groupchat":
        agents = [
            self.load(self.sanitize_agent_spec(agent_config))
            for agent_config in agent_spec.groupchat_config.agents
        ]

it's because load function call it self. and sanitize_agent_spec insert the skill prompt
Steps to reproduce
use a goup chat with agent with a skill
Model Used
No response
Expected Behavior
No response
Screenshots and logs
No response
Additional Information
No response

@victordibia is it possible that a skill is registered twice?

@nicho2,
Thanks for noting this.
There indeed was a bug where sanitize_agent_config was called twice for agents in groupchat leading to the duplicate message. I pushed a fix which should be available in v0.0.56
pip install -U autogenstudio

Closing as this has been fixed.

authors: ekzhu nicho2 victordibia

repo: microsoft/autogen


text:
Meta-issue: TeachableAgent loose ends

This meta-issue covers the following tasks wrapping up details of TeachableAgent:
### Tasks
- [ ] #450
- [ ] #532
- [ ] #251
- [ ] #329

All sub-tasks completed.


text:
The agent stops only when the number of sessions reaches the upper limit（Commenting system_message also doesn't work unless max_consecutive_auto_reply is modified）

chatbot = autogen.AssistantAgent(
name="chatbot",
system_message="For coding tasks, only use the functions you have been provided with. Reply TERMINATE when the task is done.",
llm_config=llm_config,
)
create a UserProxyAgent instance named "user_proxy"
user_proxy = autogen.UserProxyAgent(
name="user_proxy",
is_termination_msg=lambda x: x.get("content", "") and x.get("content", "").rstrip().endswith("TERMINATE"),
human_input_mode="NEVER",
max_consecutive_auto_reply=10,
code_execution_config={"work_dir": "coding"},
)
start the conversation
user_proxy.initiate_chat(
chatbot,
message="你知道中国的首都是哪里.",
)
Reply：
user_proxy (to chatbot):
你知道中国的首都是哪里.

chatbot (to user_proxy):
中国的首都是北京。

user_proxy (to chatbot):

chatbot (to user_proxy):
有什么我可以帮助你的吗？

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你有任何问题或需要帮助，请随时提问。我会尽力回答你的问题。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你需要了解一些关于中国的信息，比如地理、历史、文化等方面的内容，我可以帮助你。或者如果你有其他任何问题或需要帮助，也请告诉我。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你对中国的旅游景点、美食、传统节日等方面有兴趣，我也可以提供相关的信息给你。只需告诉我你感兴趣的方面，我会尽力为你提供帮助。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你有任何其他问题或需要帮助，请随时告诉我。我会尽力回答你的问题。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你有任何问题或需要帮助，请随时提问。我会尽力回答你的问题。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你对中国的任何方面有任何问题或需要帮助，请告诉我。我会尽力回答你或提供帮助。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你还有其他问题或需要帮助，请随时告诉我。我会尽力回答你的问题。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你有任何问题或需要帮助，请随时提问。我会尽力回答你的问题。

user_proxy (to chatbot):

chatbot (to user_proxy):
如果你有任何问题或需要帮助，请随时告诉我。我会尽力回答你的问题。

@lihui123456, the title is unclear to me. Can you provide a more detailed description of the problem, as well as an example in English?

@rickyloynd-microsoft
If max_consecutive_auto_reply is not consecuTIVE_0, for example, if I set max_consecutive_auto_reply=10, the number of sessions on the agent will not be stopped until 10 rounds, and the first round of conversations meets the expectation, but the subsequent ones are not. How can I solve this problem
here is my code
chatbot = autogen.AssistantAgent(
name="chatbot",
system_message="Your loyal assistant! Reply TERMINATE in the end when everything is done..",
llm_config=llm_config,
)
create a UserProxyAgent instance named "user_proxy"
user_proxy = autogen.UserProxyAgent(
name="user_proxy",
# is_termination_msg=lambda x: x.get("content", "") and x.get("content", "").rstrip().endswith("TERMINATE"),
is_termination_msg=lambda msg: "TERMINATE" in msg["content"],
human_input_mode="NEVER",
max_consecutive_auto_reply=10,
code_execution_config={"work_dir": "coding"},
start the conversation
user_proxy.initiate_chat(
chatbot,
message="hello.",
)
here is Dialogue
user_proxy (to chatbot):
hello.

chatbot (to user_proxy):
Hello! How can I assist you today?

user_proxy (to chatbot):

chatbot (to user_proxy):
It looks like you haven't entered any text. If you have any questions or need assistance with anything, feel free to let me know. I'm here to help!

user_proxy (to chatbot):

chatbot (to user_proxy):
It seems there might be an issue with your messages coming through. If you're trying to communicate with me, please try to send your message or question again, and I'll do my best to assist you. If you're simply testing how I respond to no input, well, here's your answer! I'm here and ready to help whenever you need.

user_proxy (to chatbot):

chatbot (to user_proxy):
If you're encountering any issues or have questions, please make sure to type them out so I can assist you. Otherwise, if you're just exploring how the system works, feel free to type 'hello' or any other message, and we can continue our interaction. I'm here to help with whatever you need!

user_proxy (to chatbot):

chatbot (to user_proxy):
It appears you may have difficulties sending messages or there might be an error. If you have a specific question or need help with a task, please try to type it again. If this is a test or if you're done, you can also type "TERMINATE" to end our conversation. Let me know if there's anything I can do for you!
thanks

Thanks for the extra info. It seems that you want the chat to terminate earlier, and you tell the assistant (in its system prompt) that it can end the chat by replying TERMINATE. But telling the assistant that it has the ability to terminate the chat does not actually give the assistant that ability. And since human_input_mode="NEVER", the user has no opportunity to type exit to end the chat. In this case, UserProxyAgent serves no purpose except to execute code and report any errors. And yet the initial message passed to initiate_chat does not tell the assistant to write any code. Everything proceeds as expected.
As the app designer, what is your high-level goal for configuring the agents in this way? What is the type of behavior you want to produce, or the type of task you want the agents to solve together?

You say that "normal chat conversations don't end in ten rounds but end in the first round and return the most reliable responses." If you want to write an app to behave in that way, you can pass max_consecutive_auto_reply=0 to UserProxyAgent. Or you can completely omit any UserProxyAgent from your code and simply pass the question or task description directly to the assistant, and use the assistant's reply as the answer. Would one of those designs meet your goal?
I don't understand your last sentence at all.
Your second example shows another way that chats can be ended. Your code contains this line:
is_termination_msg=lambda msg: "TERMINATE" in msg["content"],
As a result, the assistant successfully ends the chat well before 10 turns by including the string TERMINATE in its response. It seems to be working correctly. Or did you intend something different?

@rickyloynd-microsoft What I need is for the number of sessions not to be affected by max_consecutive_auto_reply=10, but rather to be more intelligent, so that for example a problem that requires a consecuTIVE_AUTO_REPLY =10 sessions is solved. The rest is all useless nonsense, meaning that several rounds of dialogue are not limited by the above parameters, but are left to the agent to decide when to end, the above parameters are just to prevent the agent from getting into a constant loop. thanks

Your example above shows the agent successfully deciding when to end the chat after a few turns, much less than 10. But your example doesn't involve a problem at all. Suppose that you started it with "What is 2+3?" instead of "hello". The assistant would reply "5". But the user_proxy would still reply with nothing, because there is no code to execute.
To further reduce the number of turns, you could modify the assistant's system prompt to say "When you have answered the question or solved the problem, append TERMINATE to your response to end the chat". Then the assistant may reply something like "5 TERMINATE" which would end the chat with no extra turns. Is there some other behavior you would want?

@rickyloynd-microsoft What about that hello I asked about above? Or how do we solve this problem, I don't want me to consecutive_AUTO_REPLY and the conversation stops after one round if I consecutive_CONSECUTIVE_REPLY parameters can't be changed thanks

What behavior would you expect in the "Hello" chat above? Which agent would you like to see terminate the chat, and at exactly which point?

@rickyloynd-microsoft
here is Dialogue
user_proxy (to chatbot):
hello.
chatbot (to user_proxy):
Hello! How can I assist you today?
My expectation is to stop in the first round of conversation
thanks

Are you saying that every conversation should stop right after the assistant says "How can I assist you today"? Why would anyone expect the conversation stop at this point? What if the user responds to the assistant by saying "Please write code to..."? I must be missing something that you have in mind.

Maybe your point is that it never makes sense for an agent to output an empty response, so if it's about to do that, the agent should always terminate the chat instead. Would that extra termination condition produce the behavior you expect?

@lihui123456, unless you have more to add, I'm going to open a separate issue regarding the empty responses from user_proxy, where we can discuss how best to improve the behavior. Then I'll close this issue and add a link to it in the new issue.

@rickyloynd-microsoft I think that the higher-level problem @lihui123456 mentioned is that even if the task has been done perfectly, the termination mechanism is still not as smart as expected. This is always happens when the LLM model is not as powerful as GPT-4. And there is also a similar case which mentioned in the Autogen documentation website https://microsoft.github.io/autogen/docs/FAQ/ which is the agent keep thank to each other even when the task has been finished. The suggestion is to add termination notice at the end of the prompt. I think you may also able to modify it to your case to see what will happen.

@ruifengma
I added a termination notification when the problem is resolved to the prompt, but the feeling doesn't end, it's still the same

@lihui123456 what's your termination notification looks like?

@lihui123456 When you have answered the question or solved it, add TERMINATE to your answer to end the chat    this is ok?

@ruifengma this is  a "gratitude loop"

@rickyloynd-microsoft I think that the higher-level problem @lihui123456 mentioned is that even if the task has been done perfectly, the termination mechanism is still not as smart as expected. This is always happens when the LLM model is not as powerful as GPT-4. And there is also a similar case which mentioned in the Autogen documentation website https://microsoft.github.io/autogen/docs/FAQ/ which is the agent keep thank to each other even when the task has been finished. The suggestion is to add termination notice at the end of the prompt. I think you may also able to modify it to your case to see what will happen.

@ruifengma  It's certainly true that intelligent termination and gratitude loops are challenges that we need better solutions to. And empty responses are another area of potential improvement. To make progress we need concrete examples where we know what behavior would be better than the current behavior. That's what I don't see in the example presented in this issue. The agent is not presented with a task or problem to solve; instead, the user_proxy simply says "hello". The assistant responds in reasonable ways, and after a few turns triggers the TERMINATE condition as expected, well before the maximum number of turns. The user_proxy responds with empty strings because the human user is never allowed to exit the chat manually, and no LLM is attached to the user_proxy, so its responses cannot be intelligent. It's not clear why the user_proxy agent is chosen at all in this example. In my view, since the expected behavior is unclear, this example gives us no guidance for making improvements. I would welcome a clearer example, centered on an actual task, and probably presented in a separate issue for simplicity.

Perhaps I can add some helpful details here, as I just came across this thread while investigating a similar error. I'm not sure if it completely aligns with the original issue above but given the confusion perhaps my experience can help with the issue.
I have been following Autogen developments for some time now but am only now getting my hands dirty.  I'm testing out some of the demo notebooks, and am currently working through 'agentchat_groupchat_RAG.ipynb' as it contains features I would like to implement for a project I'm working on.  I am also connecting to a local LLM running on LM Studio, perhaps that is a key detail.
When I run the 'rag_chat' function, which is set up with a boss_aid (rag proxy), coder, pm and reviewer in a 'round_robin' speaker selection method, so agents will speak in that order.  I'm only asking a question about the local documents, not asking for code.
All goes well - RAG agent collects some documents, sends the request off to the LLM, we get back a response. Next up is the coder, who basically summarizes the original response.  Then the PM who formats the information into a proper response to my original question.  Finally code_reviewer adds their feedback saying the summary is accurate.  No one has said 'terminate' yet and human interaction is 'never', so next up is the RAG agent (boss_aid), who simply responds with an empty string, which appears to be the default for RetrieveUserProxyAgent.  I'm not sure if this is an LM Studio thing, but I get back an error saying Error code: 400 - {'error': "'messages' array must only contain objects with a 'content' field that is not empty..  In the LM Studio console I can see that the last message was indeed an empty content string from the 'Boss_assistant'.
So my thought here is that the assistant should not respond with nothing but rather the same message others have (reply terminate if task is done).  That's what would be sent to the LLM in the event that there's no other messages to send.  Either that or the RAG agent shouldn't be in the group chat and it communicates via function calls from the other agents (the last example in the notebook).  Or maybe the default reply should be something along the lines of "reply 'terminate' when everything is done, or 'update context' if you need more information'.

Perhaps I can add some helpful details here, as I just came across this thread while investigating a similar error. I'm not sure if it completely aligns with the original issue above ...

@mferris77  Thanks for the concrete example! Group chats are especially complex, glad you found a way to make it work. I can't tell whether your example addresses the concern that prompted the creation of this issue, so I'm going to close this issue and thank everyone involved in the discussion. You're all invited to open a separate issue if you can find a clear example of a specific problem for us to work on solving.

@mferris77 Can you please explain where I can add this one?


text:
az containerapp connection create with --no-wait throws an exception

Please provide us with the following information:

This issue is a: (mark with an x)

[x] bug report -> please search issues before submitting
[ ] documentation issue or request
[ ] regression (a behavior that used to work and stopped in a new release)

Issue description
az containerapp connection create with --no-wait throws an exception.
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001F1EF9349A0>, <function OutputProducer.on_global_arguments at 0x000001F1EFAD5EE0>, <function CLIQuery.on_global_arguments at 0x000001F1EFAFFA60>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command.
cli.azure.cli.core: Command index has been invalidated.
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: acr                       0.840        36       149
cli.azure.cli.core: acs                       0.096        14        76
cli.azure.cli.core: advisor                   0.011         3         6
cli.azure.cli.core: ams                       0.019        22       100
cli.azure.cli.core: apim                      0.030        14        69
cli.azure.cli.core: appconfig                 0.017         9        47
cli.azure.cli.core: appservice                0.183        79       270
cli.azure.cli.core: aro                       0.092         1        10
cli.azure.cli.core: backup                    0.018        16        60
cli.azure.cli.core: batch                     0.101        34       102
cli.azure.cli.core: batchai                   0.017        10        30
cli.azure.cli.core: billing                   0.082        19        53
cli.azure.cli.core: botservice                0.011        12        42
cli.azure.cli.core: cdn                       0.549         8        50
cli.azure.cli.core: cloud                     0.010         1         7
cli.azure.cli.core: cognitiveservices         0.019        10        33
cli.azure.cli.core: compute_recommender       0.023         1         1
cli.azure.cli.core: config                    0.009         2         7
cli.azure.cli.core: configure                 0.010         2         5
cli.azure.cli.core: consumption               0.089         8         9
cli.azure.cli.core: container                 0.050         1        11
cli.azure.cli.core: containerapp              0.305        37       123
cli.azure.cli.core: cosmosdb                  0.061        58       199
cli.azure.cli.core: databoxedge               0.048         5        28
cli.azure.cli.core: dla                       0.016        23        62
cli.azure.cli.core: dls                       0.015         7        41
cli.azure.cli.core: dms                       0.011         3        22
cli.azure.cli.core: eventgrid                 0.016        25        96
cli.azure.cli.core: eventhubs                 0.083        13        19
cli.azure.cli.core: extension                 0.004         1         7
cli.azure.cli.core: feedback                  0.005         1         2
cli.azure.cli.core: find                      0.010         1         1
cli.azure.cli.core: hdinsight                 0.041         8        39
cli.azure.cli.core: identity                  0.012         2        11
cli.azure.cli.core: interactive               0.003         1         1
cli.azure.cli.core: iot                       0.460        19        82
cli.azure.cli.core: keyvault                  0.029        20       113
cli.azure.cli.core: kusto                     0.015         3        14
cli.azure.cli.core: lab                       0.020        11        34
cli.azure.cli.core: managedservices           0.015         3         8
cli.azure.cli.core: maps                      0.013         5        13
cli.azure.cli.core: marketplaceordering       0.025         1         2
cli.azure.cli.core: monitor                   1.108        18        61
cli.azure.cli.core: mysql                     0.518        15        53
cli.azure.cli.core: netappfiles               0.240         8        17
cli.azure.cli.core: network                   0.236       103       339
cli.azure.cli.core: policyinsights            0.081         9        17
cli.azure.cli.core: privatedns                0.094        14        60
cli.azure.cli.core: profile                   0.007         2         8
cli.azure.cli.core: rdbms                     0.089        49       202
cli.azure.cli.core: redis                     0.011         7        38
cli.azure.cli.core: relay                     0.143         7         8
cli.azure.cli.core: resource                  0.048        51       231
cli.azure.cli.core: role                      0.010        17        61
cli.azure.cli.core: search                    0.046         7        19
cli.azure.cli.core: security                  0.060        48        98
cli.azure.cli.core: servicebus                0.053        12        15
cli.azure.cli.core: serviceconnector          0.142        20       309
cli.azure.cli.core: servicefabric             0.083        27        80
cli.azure.cli.core: signalr                   0.011         9        34
cli.azure.cli.core: sql                       0.055        56       215
cli.azure.cli.core: sqlvm                     0.089         4        20
cli.azure.cli.core: storage                   0.194        59       273
cli.azure.cli.core: synapse                   0.048        54       246
cli.azure.cli.core: util                      0.006         3         7
cli.azure.cli.core: vm                        0.142        58       269
cli.azure.cli.core: Total (66)                6.994      1206      4734
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (2)                 0.182        50       141
cli.azure.cli.core: Loaded 1228 groups, 4843 commands.
cli.azure.cli.core: Updated command index in 0.007 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001F1F1D18F40>]
az_command_data_logger: command args: containerapp connection create servicebus --resource-group {} --name {} --container {} --target-resource-group {} --namespace {} --user-identity {} {} --no-wait --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x000001F1F1D95A80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x000001F1F1D95B20>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x000001F1F1D95C60>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x000001F1F50A84A0>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001F1EFAD5F80>, <function CLIQuery.handle_query_parameter at 0x000001F1EFAFFB00>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x000001F1F1D95BC0>]
cli.azure.cli.command_modules.serviceconnector._validators: Connection name is not specified, use generated one: --connection servicebus_0rijp
cli.azure.cli.command_modules.serviceconnector._validators: Client type is not specified, use default one: --client-type none
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceLinkerManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d
msal.authority: openid_config("https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/ec449cfa-3a33-4fde-ba33-ce11d541198d/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? True
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 9ec1c97f-f820-46ed-8795-d70e03f33302
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '518'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '05b46ced-7a11-11ef-9f2d-a0b3398c98c7'
cli.azure.cli.core.sdk.policies:     'CommandName': 'containerapp connection create servicebus'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --container --target-resource-group --namespace --user-identity --no-wait --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22631-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: Response status: 201
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '1476'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'ETag': '"2201e08b-0000-2300-0000-66f210440000"'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies:     'x-ms-providerhub-traffic': 'True'
cli.azure.cli.core.sdk.policies:     'mise-correlation-id': '096730c1-3655-42f5-b322-c7a13edcdbcc'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'd551169a-28be-4a51-9a4b-b5130bf829fe'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '5f0f477a-fdb9-4fa8-b9d9-d50c0d1a68a4'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'JAPANEAST:20240924T010508Z:5f0f477a-fdb9-4fa8-b9d9-d50c0d1a68a4'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 8F6293BD28824608A47844724D317EBC Ref B: TYO201151005054 Ref C: 2024-09-24T01:05:07Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Tue, 24 Sep 2024 01:05:07 GMT'
cli.azure.cli.core.sdk.policies: Response content:
azure.mgmt.servicelinker._serialization: Discriminator type is absent or null, use base class TargetServiceBase.
azure.mgmt.servicelinker._serialization: Discriminator auth_type is absent or null, use base class AuthInfoBase.
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 709, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/serviceconnector/_transformers.py", line 56, in transform_linker_properties
AttributeError: 'NoneType' object has no attribute 'get'

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 709, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/serviceconnector/_transformers.py", line 56, in transform_linker_properties
AttributeError: 'NoneType' object has no attribute 'get'
az_command_data_logger: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 709, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/serviceconnector/_transformers.py", line 56, in transform_linker_properties
AttributeError: 'NoneType' object has no attribute 'get'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001F1F1D191C0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 8.852 seconds (init: 0.596, invoke: 8.256)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 7831 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Steps to reproduce
az containerapp connection create servicebus \
--resource-group {resource-group} \
--name {container-app} \
--container {container-name} \
--target-resource-group {resource-group} \
--namespace {service-bus-namespace} \
--user-identity client-id={client-id} subs-id={subscription-id} \
--no-wait \
--debug

Expected behavior [What you expected to happen.]
It should complete successfully.
Actual behavior [What actually happened.]
The Service Connection is created but an exception is thrown.
Additional context
$ az version
{
  "azure-cli": "2.63.0",
  "azure-cli-core": "2.63.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "containerapp": "1.0.0b3",
    "ssh": "2.0.5"
  }
}

@masashiyonekawa Could you please remove the --no-wait flag and retest again.

@masashiyonekawa Could you please remove the --no-wait flag and retest again.

@v-vish
Yes, I know that if I remove the flag, the exception won't occur.

@masashiyonekawa the connection command orchestrates quite a few resource providers under the hood. It'll be impossible to make the --no-wait command work well under those circumstances. We will treat this as a bug to remove the option from the command going forward.

hi @xfz111, could you pls have a look? thanks

authors: masashiyonekawa simonjj v-vish yungezz

repo: microsoft/azure-container-apps


text:
adjust printCurrentSubscription to getAzureClient and add some utilit…

…y functions to AppServiceUtils

Codecov Report

Merging #1158 into develop will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop    #1158   +/-   ##
==========================================
  Coverage      56.93%   56.93%
  Complexity       276      276
==========================================
  Files             27       27
  Lines           1291     1291
  Branches         154      154
==========================================
  Hits             735      735
  Misses           479      479
  Partials          77       77

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ef7966...131ff6e. Read the comment docs.

authors: andxu codecov-commenter

repo: microsoft/azure-maven-plugins


text:
Question: Does this still exist task.json documentation.md?

In a old pull request I found there used to be a task.json documentation.md that described how groups worked in task.json. Does this documentation still exists now since I can't find it anymore?
https://github.com/Microsoft/azure-pipelines-tasks/pull/1066/files
I'm trying to figure out how to group things and wonder if you use groups that all the inputs should be grouped or how the grouped items will appear (will it be below the non grouped inputs)

There are some docs here - https://docs.microsoft.com/en-us/azure/devops/extend/develop/integrate-build-task?view=azure-devops - and a schema here - https://docs.microsoft.com/en-us/azure/devops/extend/develop/integrate-build-task?view=azure-devops.
If neither of those meet your needs, please file an issue at https://github.com/MicrosoftDocs/azure-devops-docs/issues - that repo is dedicated for docs issue, while this repo is more meant for questions/issues about specific tasks

authors: NancyChong damccorm

repo: microsoft/azure-pipelines-tasks


text:
Question: How to specify multiple so in nativeLibrariesPath

Hi,
In the azure pipeline task AppCenterDistribute@3, I upload the native library symbols to app center to help symbolicate native crashes. Currently, we only upload ARM library symbols and want to specify ARM64 as well.
How do I specify multiple paths in 'nativeLibrariesPath' parameter?
Thanks

Hi @sakthiyuvaraj,
You can use a pattern with braces notation to specify multiple paths. Please try something this:
libraries/{ARM,ARM64}

@alexander-prozorov,
I tried:
nativeLibrariesPath: 'libpath{ARM,ARM64}\ShipRelease\libControl.so'
But, it failed with
Cannot find any file based on C:\a\1\s\src\libpath{ARM,ARM64}\ShipRelease\libControl.so
Does braces notation work inside nativeLibrariesPath?

Apparently, nobrace option is true by default, since no matchOptions are passed:
https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AppCenterDistributeV3/utils.ts#L158

authors: alexander-prozorov sakthiyuvaraj


text:
CG fix for common-npm-packages/build-scripts

Task name: common-npm-packages/build-scripts
Description:
Documentation changes required: (Y/N)
Added unit tests: (Y/N)
Attached related issue: (Y/N)
Checklist:

[ ] Task version was bumped - please check instruction how to do it
[x] Checked that applied changes work as expected

/azp run

authors: rvairavelu v-mohithgc


text:
Enhance the output during the sync dependencies step when a task is being built

Changes: Enhanced the output during the sync dependencies step when a task is being built
Related WI: AB#2165764

/azp run


text:
Random Connect Failures

Issue Type: Bug
SQL query fails to run even though a valid connection was working just moments before. In orde to fix this I have to close the window, re-open the window and reconnect to the data source.
Azure Data Studio version: azuredatastudio 1.43.0 (b790d700898b1095d83e62f0de14678a58222520, 2023-04-10T23:14:27.236Z)
OS version: Windows_NT x64 10.0.22621
Restricted Mode: No
Preview Features: Disabled

System Info

Item
Value

CPUs
12th Gen Intel(R) Core(TM) i7-12800H (20 x 2803)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
undefined

Memory (System)
31.68GB (8.28GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (5)

Extension
Author (truncated)
Version

admin-pack
Mic
0.0.2

agent
Mic
0.49.0

dacpac
Mic
1.13.0

import
Mic
1.5.4

profiler
Mic
0.12.2

Hi @kfordaccela
What's the error that you are receiving? Are you able to provide logs?

Closing based on previous comments and lack of logs for further investigation.  Please let us know if you're still impacted by this issue.

authors: cheenamalhotra kburtram kfordaccela

repo: microsoft/azuredatastudio


text:
Connection issue

Issue Type: Bug
I almost experience connection issue when accessing remote sql server on my mac,although i am able to connect to the same server using Sql server management studio using windows on virtual box on the same machine.
Sometimes the message would be
Total execution time: 00:00:00
And sometimes the error msg which states TCP related connection issue.
Whatever be the message SSMS on windows does not have any connection is issue whatever the timeline be.
I tried changing internet connections and still the problem persists
Azure Data Studio version: azuredatastudio 1.43.0 (b790d700898b1095d83e62f0de14678a58222520, 2023-04-10T23:12:47.777Z)
OS version: Darwin x64 22.3.0
Restricted Mode: No
Preview Features: Enabled

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
3, 2, 2

Memory (System)
16.00GB (1.13GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (5)

Extension
Author (truncated)
Version

import
Mic
1.5.4

query-history
Mic
0.5.3

schema-compare
Mic
1.18.0

extra-sql-script-as
pac
0.3.0

ADS-add-columns
sof
0.0.12

Hi @sahalMoidu
Can you please provide logs for investigation as per instructions above?

Closing as not enough info available to investigate error.

authors: cheenamalhotra sahalMoidu


text:
Difficult to scroll when there are multiple results grids

Azure Data Studio Version: 1.3.8 (also exists in 1.2.4)
Steps to Reproduce:

Run a query with multiple result sets, such as select 1; select 2; select 3; select 4; select 5;
Place your cursor in one of the results grids (not on its header) and try to scroll

Expected behavior: The result sets scroll so that you can see all results
Actual behavior: The result sets do not scroll when your mouse is inside the result grid, only when it is in the result grid header or when it is in the export buttons or scrollbar to the right of the grid

This was working at one point, I'll have to check what changed.

With multiple resultsets you may not even be able to see all the results because of the scrolling issue. I have a particular query that returns 4 result sets back. The first couple are fine but trying to scroll to the last 2 tends to either not work at all or doesn't render the expected rows. It is inconsistent.

I just downloaded and installed Azure Data Studio today, and I am having the same issue.

Ditto, scrolling is odd in v1.18.  If you grab the vertical scroll bar and slide down you can see everything but the pane sort of jumps as it scrolls down.

@anthonydresser I'm also seeing the jumpy scrolling behavior when running with multiple resultssets.  For example, if I use the below query and scroll the grids up-and-down the scrolling is noticeably unsmooth.  Do you know if anything changed here?
SELECT TOP 100 *
FROM sys.all_objects

SELECT TOP 100 *
FROM sys.all_objects

SELECT TOP 100 *
FROM sys.all_objects

SELECT TOP 100 *
FROM sys.all_objects

I came here looking for a setting to turn on to allow me to scroll through multiple result panes without stopping at the bottom of the current one, but am I correct in assuming that this is a bug, not a feature?
Thanks for all your efforts! Let me know if I can lend a hand.

I came here looking for a setting to turn on to allow me to scroll through multiple result panes without stopping at the bottom of the current one, but am I correct in assuming that this is a bug, not a feature?
Thanks for all your efforts! Let me know if I can lend a hand.

I am having same issue. Is there a way we can view multiple result sets as tab (Some widget that we can add.), instead of scrolling?

Hello, the problem still exists in version 1.41.2.

Yeah, I tried using Azure Data Studio this week and hit this scrolling bug basically immediately.  My work regularly involves stored procedures that generate upwards of 15 result sets.  The scrolling bug makes Azure Data Studio almost unusable in this context.

This is a nightmare. Would someone take pity on us poor souls that have to deal with this for a living? It makes life impossible for those that need to regularly work with multiple result sets.

I've struck this with version 1.46.1.
I've noticed I have to have the mouse pointer over the rather narrow outermost scroll bar (as opposed to the separate scroll bars for each result set) to be able to scroll the whole set of results sets up or down.  This is in contrast to SSMS which will scroll all the results sets if the mouse pointer is anywhere in the result pane.
Even if I scroll with the mouse pointer over the outermost scroll bar it's almost like trying to scroll with a dodgy mouse wheel - it's not smooth all the time, sometimes it seems to stick.  Sometimes it seems to get stuck on a result set and I can't scroll up or down.  But if I scroll aggressively, with large quick movements of the mouse wheel, it seems to get unstuck and I can scroll in either direction past the result set it previously got stuck on.

authors: AnotherSadGit CoolDadTx MattIrv UgmaDevelopment alxalm anthonydresser dahln hervehobbes kburtram kunalpgithub sharpjs timothyhoffmann


text:
Add telemetry for what users have in publish profile

Currently we only have telemetry for if a profile has been loaded when a publish or generate script happens. This adds another event for when a profile gets loaded to get more information on what users are using the profile for.
Publish options get parsed and returned from the STS dacfxService.getOptionsFromProfile() call, so we'd have to add logic there to return if there are any publish options specified in the publish profile. When SSDT creates a new profile, IncludeCompositeObjects set to true is added by default to override the default, so almost all publish profiles will have at least this option specified.

Pull Request Test Coverage Report for Build 2545924189

4 of 4 (100.0%)  changed or added relevant lines in 2 files are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 42.125%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/common/ports.ts
4
74.14%

Totals

Change from base Build 2545863977:
-0.005%

Covered Lines:
28182

Relevant Lines:
62415

💛  - Coveralls

authors: coveralls kisantia


text:
removed hidden overflow for schema compare splitview

Fixes #6609.

Is there an issue associated with this change? Let's make sure we have issues tracking all fixes/improvements we're making!

Thanks @Charles-Gagnon, my apologies--just updated the description to reflect that this fixes #6609.

Thanks @Charles-Gagnon, I didn't know this! Also including another gif to show overflow with the terminal panel visible.

@kburtram, @yualan - is the double scroll bar okay fix for accessibility?

@ellbosch can you please resolve conflicts and complete this. That will give people a way to test new vs old behavior. Let's discuss if there are any concerns.

@ellbosch do you still need this branch?

authors: Charles-Gagnon alanrenmsft ellbosch udeeshagautam


text:
Allow both CBL-Mariner and Azure Linux in spec source changelog entry

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge

Summary

(Cherry-picked from #8173)

For new packages in 3.0, the changelog entry where we mention the source of the spec file should be allowed to contain either CBL-Mariner or Azure Linux. Updating the regex in spec file check to use that logic.

I would check with @jslobodzian if AZL is ok for 2.0

Yeah...prefer we spell it out as Azure Linux.

Closing this PR from offline discussion. We don't need to enforce the name Azure Linux for 2.0

authors: jslobodzian trungams

repo: microsoft/azurelinux


text:
Unknown Intent handler confusion with multi-turn QnAMakerDialog

Version
4.9.0-rc4
Describe the bug
When using QnAMakerDialog within a Composer dialog, the unknown intent handler is triggered when when answering a multi-turn QnA prompt.
If you ask a question that has follow-on prompts, these options are shown. The user then chooses an option (clicks the button or types) and the fallback answer (Sorry, I did not find an answer) is shown (courtesy of the unknown intent handler) before the actual QnA is then shown.
To Reproduce
Steps to reproduce the behavior:

Create a multi-turn KB item in QnAMaker
Configure QnAMakerDialog inside composer
Configure an Unknown Intent handler that sends a "don't understand message"
Test a multi turn scenario and observe two responses, one from unknown intent handler and one from QnAMaker.

Expected behavior

Unknown intent handler doesn't fire if you are in progress with a qnamaker multi-turn dialog

Screenshots
QnAMaker Editorial

QnaMakerDialog experience

Additional context

Assuming a filter on the unknown intent handler to know if QnAMakerDialog is still active might be the workaround?

[bug]

Turns out a unhandled intent trigger was firing on the (second) response to a in-progress QnAMaker dialog resulting in a "unknown utterance" message being responded and then the QnAMAker dialog resumes hence the confusion.

@tomlm, I believe this was fixed by the PR, and that you also merged 4.9 back into master.
Can we close this issue out?

@ryanlengel validated. Thanks!

authors: cleemullins darrenj

repo: microsoft/botbuilder-dotnet


text:
[PORT] Fix typos [mostly] in the bot.builder namespace

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/3349

I also groomed some content, but did not perform a sanity check on all files touched.
Changed projects

Microsoft.Bot.Builder.ApplicationInsights
Microsoft.Bot.Builder

[docs]

docs

authors: Stevenic tomlm

repo: microsoft/botbuilder-js


text:
Update builds to only run highest priority UI tests only.

Describe the bug

Currently all the UI tests are run as part of the CI builds. With new UI tests coming online, only the highest priority and most reliable tests should be run as part of the CI builds. The remaining tests can be run locally and during monthly test passes.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

authors: MicrosoftIssueBot sanderl

repo: microsoft/calculator


text:
Fixes the issues the focus state issues when users open the context menu on EquationEditBoxes

Fixes #1153.
Description of the changes:

Updated the AddNewEquation method to only set the focus state to the new equation if the submission source was not lost focus
Updated the EquationEditBox focus states to also give focus to the RichEditBox when m_hasFocus is true.

How changes were validated:

manually

As I run through the issue more, I think there are a few more problems with submitting when we open the context menu than just this bug. For example, trying to copy/paste with an equation that has not yet been submitted is broken since when we submit the equation, the RichEditBox clears its selection and cursor state, so the intended copy/cut/paste the user wanted to do when they opened the menu is no longer possible.
Maybe the right fix here is not submitting at all when the context menu opens, thoughts?

We had an offline conversation and decided that the equation should not be submitted when the context menu is opened, but instead when the user clicks an action in the context menu that needs the equation to be graphed (i.e. analyze function)

Closing this PR since it was fixed in PR #1220


text:
Standardize code review templates

Updated all recipe docs (except python) to conform to a common standard - Python is changed in #150
Update all links for CSE and other links to work after change in PR #148
Remove TypeScript recipe as we already have a JavaScript/TypeScript recipe and moved the relevant parts into the JavaScript recipe
Add link to the Terraform.md from the readme

TODO: this is not verifying or updating technical content - this will be updated in a series of other issues. This is to move the existing content to a consistent format

I think these recipes are missing guidelines on testing tools/platforms for each language. When starting out in a new language or in a new organization it is very helpful to know what others are using for testing. what do you think?
I noticed that the recipes don't all have the same sections, Is that intentional? For example, dependencies is not always there. If we think that the recipes should contain relevant info about dependencies it would be nice to have it there and add a TODO to think about any guideline we want to add there.

I think these recipes are missing guidelines on testing tools/platforms for each language. When starting out in a new language or in a new organization it is very helpful to know what others are using for testing. what do you think?
I noticed that the recipes don't all have the same sections, Is that intentional? For example, dependencies is not always there. If we think that the recipes should contain relevant info about dependencies it would be nice to have it there and add a TODO to think about any guideline we want to add there.

See comments about testing above...
Regarding different sections, some will have language specific sections like dependencies. The common sections that would be relevant to most are listed in the task.  But even those would not be required. As an example, linters will not be applicable to C# or Java

authors: TessFerrandez saroup


text:
Adding jupyter notebook for presales qualification of data driven sim…

Major changes

inclusion of timelag when converting csv_to_pickle, can change from config
release version of jupyter notebook presales evaluation
source version of jupyter notebook presales evaluation

Things to look forward to in this MVP:

Things i'd like you to review:

start with release version of jupyter notebook jupyter notebook release/presales_evaluation/presales_evaluation.ipynb

cells are hidden to provide simplicity of interfacing with the notebook (do you appreciate this?)
run each cell with example data provided --- you will see assertion errors, but that's because SME limits are outside of what data was collected. Just continue running the later cells.
Click validate button (it will fail because not all asserts pass)

move onto source version of jupyter notebook. This shows all the hidden code separated by ### BEGIN HIDDEN TESTS and ### END HIDDEN TESTS.

You now can look at the assert checks, reduce SME limits to make it easier to pass assert tests

NOTE: Usage of Gaussian Mixture Models is an unsupervised learning method to cluster data to produce mean and covariances. The GMM can then be used to determine the probability vector (of length number of clusters) that the sample is close to one of the clusters. The probability vector, summed, will always add up to 1. I DO NOT THINK THIS IS THE WAY TO GO, I WOULD SUGGEST ALI/AMIR IMPLEMENT MMD or KL DIVERGENCE AT A LATER SPRINT, THIS IS AN MVP.

PR SONG: https://www.youtube.com/watch?v=a5_QV97eYqM

@HosseinHeris PR is ready for review again. I discovered that the release version does not run the hidden code because it is simply removed, this means that clicking the Validate button says you pass when code is hidden......
Please let me know what you think, perhaps we get rid of the nbgrader package

checks for strings, objects, clutter in data
removed other files like featureImportance.py and checkDataQuality.py because it is now all in the jupyter notebook (unhidden lol)
moved csv files to csv_data folder

Merging so we can progress...

repo: microsoft/datadrivenmodel


text:
Inconsistent styling in results window

In the Portability Analysis Results window, only the first entry's buttons have the correct style:

(this screenshot shows what it looks like with High Contrast Black theme)
The inconsistency also creates an accessibility issue: in the second and third rows, the contrast ratio between the buttons and their labels is too low.

Further investigation reveals each row is styled when it is created, and the style applied is correct for the state of Windows' high contrast theme when the row is created. The inconsistency I observed is due to toggling high contrast between analyses.

repo: microsoft/dotnet-apiport